Changeset 16198 in josm for trunk


Ignore:
Timestamp:
2020-03-23T08:55:27+01:00 (5 years ago)
Author:
GerdP
Message:

see #18969: Improve performance of validator checks

Location:
trunk/src/org/openstreetmap/josm/data/validation/tests
Files:
2 edited

Legend:

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

    r12620 r16198  
    9393        checkNumberOfLanes(p);
    9494    }
     95
     96    @Override
     97    public boolean isPrimitiveUsable(OsmPrimitive p) {
     98        return p.isTagged() && super.isPrimitiveUsable(p);
     99    }
    95100}
  • trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java

    r14525 r16198  
    7878    @Override
    7979    public void check(OsmPrimitive p) {
     80        if (!p.isTagged())
     81            return;
    8082        Set<String> names = p.getKeys().entrySet().stream()
    8183                .filter(e -> e.getValue() != null && e.getKey().startsWith("name:") && !EXCLUSIONS.contains(e.getKey()))
     
    114116        }
    115117    }
     118
     119    @Override
     120    public boolean isPrimitiveUsable(OsmPrimitive p) {
     121        return p.isTagged() && super.isPrimitiveUsable(p);
     122    }
     123
    116124}
Note: See TracChangeset for help on using the changeset viewer.