Changeset 14455 in josm for trunk


Ignore:
Timestamp:
2018-11-26T07:01:49+01:00 (11 months ago)
Author:
GerdP
Message:

fix #17028: improve performance of some validator tests

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

Legend:

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

    r13147 r14455  
    243243    @Override
    244244    public void check(OsmPrimitive p) {
    245         errors.addAll(validatePrimitive(p));
     245        if (p.isTagged()) {
     246            errors.addAll(validatePrimitive(p));
     247        }
    246248    }
    247249}
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java

    r13331 r14455  
    323323    @Override
    324324    public void check(final OsmPrimitive p) {
    325         check(p, "opening_hours");
    326         check(p, "collection_times");
    327         check(p, "service_times");
     325        if (p.isTagged()) {
     326            check(p, "opening_hours");
     327            check(p, "collection_times");
     328            check(p, "service_times");
     329        }
    328330    }
    329331}
Note: See TracChangeset for help on using the changeset viewer.