Changeset 11627 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
- Timestamp:
- 2017-02-26T00:59:32+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
r11452 r11627 293 293 } 294 294 295 //Delete all relations in the list 295 // Delete all relations in the list 296 296 relFix.remove(relationToKeep); 297 297 commands.add(new DeleteCommand(relFix)); … … 306 306 // We fix it only if there is no more than one relation that is relation member. 307 307 Collection<? extends OsmPrimitive> sel = testError.getPrimitives(); 308 Set<Relation> rel ations = new HashSet<>();308 Set<Relation> rels = new HashSet<>(); 309 309 310 310 for (OsmPrimitive osm : sel) { 311 311 if (osm instanceof Relation) { 312 rel ations.add((Relation) osm);313 } 314 } 315 316 if (rel ations.size() < 2)312 rels.add((Relation) osm); 313 } 314 } 315 316 if (rels.size() < 2) 317 317 return false; 318 318 319 319 int relationsWithRelations = 0; 320 for (Relation w : rel ations) {320 for (Relation w : rels) { 321 321 List<Relation> rel = OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class); 322 322 if (!rel.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.
