Changeset 16793 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-07-18T06:38:46+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r16652 r16793 25 25 import org.openstreetmap.josm.data.osm.Relation; 26 26 import org.openstreetmap.josm.data.osm.RelationMember; 27 import org.openstreetmap.josm.data.preferences.BooleanProperty; 27 28 import org.openstreetmap.josm.data.validation.OsmValidator; 28 29 import org.openstreetmap.josm.data.validation.Severity; … … 69 70 public static final int RELATION_LOOP = 1710; 70 71 // CHECKSTYLE.ON: SingleSpaceSeparator 72 73 // see 19312 comment:17 74 private static final BooleanProperty ALLOW_COMPLEX_LOOP = new BooleanProperty("validator.relation.allow.complex.dependency", false); 71 75 72 76 /** … … 405 409 @Override 406 410 public void endTest() { 411 if (Boolean.TRUE.equals(ALLOW_COMPLEX_LOOP.get())) { 412 loops.removeIf(loop -> loop.size() > 2); 413 } 407 414 loops.forEach(loop -> errors.add(TestError.builder(this, Severity.ERROR, RELATION_LOOP) 408 415 .message(loop.size() == 2 ? tr("Relation contains itself as a member") … … 465 472 path.add(parent); 466 473 test.checkLoop(child, path); 474 if (Boolean.TRUE.equals(ALLOW_COMPLEX_LOOP.get())) { 475 test.loops.removeIf(loop -> loop.size() > 2); 476 } 467 477 if (test.loops.isEmpty()) 468 478 return Collections.emptyList();
Note:
See TracChangeset
for help on using the changeset viewer.