Changeset 15003 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2019-04-20T19:38:30+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
r14974 r15003 29 29 protected static final int MORE_FROM = 1805; 30 30 protected static final int MORE_TO = 1806; 31 protected static final int UN KNOWN_ROLE = 1807;32 protected static final int UN KNOWN_TYPE = 1808;31 protected static final int UNEXPECTED_ROLE = 1807; 32 protected static final int UNEXPECTED_TYPE = 1808; 33 33 protected static final int FROM_VIA_NODE = 1809; 34 34 protected static final int TO_VIA_NODE = 1810; … … 115 115 break; 116 116 default: 117 errors.add(TestError.builder(this, Severity.WARNING, UN KNOWN_ROLE)118 .message(tr("Un known role in restriction"))117 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE) 118 .message(tr("Unexpected role ''{0}'' in restriction", m.getRole())) 119 119 .primitives(l) 120 120 .highlight(m.getMember()) … … 123 123 } else if (m.isNode()) { 124 124 Node n = m.getNode(); 125 switch (m.getRole()) { 126 case "via": 125 if ("via".equals(m.getRole())) { 127 126 if (!via.isEmpty()) { 128 127 if (via.get(0) instanceof Node) { … … 134 133 via.add(n); 135 134 } 136 break; 137 case "location_hint": 138 errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE) 139 .message(tr("Role ''{0}'' is not in templates", m.getRole())) 140 .primitives(l) 141 .highlight(m.getMember()) 142 .build()); 143 break; 144 default: 145 errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE) 146 .message(tr("Unknown role in restriction")) 135 } else { 136 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE) 137 .message(tr("Unexpected role ''{0}'' in restriction", m.getRole())) 147 138 .primitives(l) 148 139 .highlight(m.getMember()) … … 150 141 } 151 142 } else { 152 errors.add(TestError.builder(this, Severity.WARNING, UN KNOWN_TYPE)153 .message(tr("Un known member type"))143 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_TYPE) 144 .message(tr("Unexpected member type in restriction")) 154 145 .primitives(l) 155 146 .highlight(m.getMember())
Note:
See TracChangeset
for help on using the changeset viewer.