Changeset 17861 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2021-05-06T10:31:36+02:00 (3 years ago)
Author:
GerdP
Message:

fix #19647: Exclude all but ways with highway=* from Lanes.java test

  • make isPrimitiveUsable() more restrictive (patch by Gabe, modified)

Unit tests bypass this method so they need no changes.

File:
1 edited

Legend:

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

    r17584 r17861  
    99
    1010import org.openstreetmap.josm.data.osm.OsmPrimitive;
     11import org.openstreetmap.josm.data.osm.Way;
    1112import org.openstreetmap.josm.data.validation.Severity;
    1213import org.openstreetmap.josm.data.validation.Test;
     
    9697    @Override
    9798    public boolean isPrimitiveUsable(OsmPrimitive p) {
    98         return p.isTagged() && super.isPrimitiveUsable(p);
     99        return p.isTagged() && p instanceof Way && p.hasTag("highway")  && super.isPrimitiveUsable(p);
    99100    }
    100101}
Note: See TracChangeset for help on using the changeset viewer.