Changeset 7885 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2014-12-25T16:38:00+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r7884 r7885 15 15 import org.openstreetmap.josm.command.DeleteCommand; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;18 17 import org.openstreetmap.josm.data.osm.Relation; 19 18 import org.openstreetmap.josm.data.osm.RelationMember; … … 168 167 private boolean checkMemberType(Role r, RelationMember member) { 169 168 if (r.types != null) { 170 if (member.getDisplayType().equals(OsmPrimitiveType.NODE)) { 169 switch (member.getDisplayType()) { 170 case NODE: 171 171 return r.types.contains(TaggingPresetType.NODE); 172 } 173 if (member.getDisplayType().equals(OsmPrimitiveType.CLOSEDWAY)) { 172 case CLOSEDWAY: 174 173 return r.types.contains(TaggingPresetType.CLOSEDWAY); 175 } 176 if (member.getDisplayType().equals(OsmPrimitiveType.WAY)) { 174 case WAY: 177 175 return r.types.contains(TaggingPresetType.WAY); 178 } 179 if (member.getDisplayType().equals(OsmPrimitiveType.RELATION)) { 176 case RELATION: 180 177 return r.types.contains(TaggingPresetType.RELATION); 181 }182 // not matching type183 return false;178 default: // not matching type 179 return false; 180 } 184 181 } else { 185 182 // if no types specified, then test is passed
Note:
See TracChangeset
for help on using the changeset viewer.