Changeset 14588 in josm for trunk/src/org


Ignore:
Timestamp:
2018-12-22T19:03:47+01:00 (6 years ago)
Author:
GerdP
Message:

fix findbugs, remove redundant code

One small side effect: test "self-crossing" is now "self-crossing ways" in the progress monitor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r14468 r14588  
    224224
    225225        @Override
    226         MessageHelper createMessage(Way w1, Way w2) {
    227             return new MessageHelper(tr("Crossing boundaries"), CROSSING_BOUNDARIES);
    228         }
    229 
    230         @Override
    231226        public void visit(Relation r) {
    232227            for (Way w : r.getMemberPrimitives(Way.class)) {
     
    260255        }
    261256
    262         @Override
    263         MessageHelper createMessage(Way w1, Way w2) {
    264             return new MessageHelper(tr("Crossing barriers"), CROSSING_BARRIERS);
    265         }
    266257    }
    267258
     
    281272         */
    282273        public SelfCrossing() {
    283             super(tr("Self crossing"), CROSSING_SELF);
     274            super(tr("Self crossing ways"), CROSSING_SELF);
    284275        }
    285276
     
    293284        boolean ignoreWaySegmentCombination(Way w1, Way w2) {
    294285            return w1 != w2; // should not happen
    295         }
    296 
    297         @Override
    298         MessageHelper createMessage(Way w1, Way w2) {
    299             return new MessageHelper(tr("Self-crossing ways"), CROSSING_SELF);
    300286        }
    301287    }
     
    351337    abstract boolean ignoreWaySegmentCombination(Way w1, Way w2);
    352338
    353     abstract MessageHelper createMessage(Way w1, Way w2);
     339    MessageHelper createMessage(Way w1, Way w2) {
     340        return new MessageHelper(this.name, this.code);
     341    }
    354342
    355343    @Override
Note: See TracChangeset for help on using the changeset viewer.