Changeset 16616 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-06-14T11:24:35+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r16445 r16616 44 44 45 45 // CHECKSTYLE.OFF: SingleSpaceSeparator 46 /** Role ''{0}'' is not in templates ''{1}'' */46 /** Role ''{0}'' is not among expected values ''{1}'' */ 47 47 public static final int ROLE_UNKNOWN = 1701; 48 48 /** Empty role found when expecting one of ''{0}'' */ … … 320 320 for (String key : map.keySet()) { 321 321 if (allroles.keySet().stream().noneMatch(role -> role.isRole(key))) { 322 String templates = allroles.keySet().stream().map(r -> r.key).collect(Collectors.joining("/")); 322 String templates = allroles.keySet().stream() 323 .map(r -> r.key) 324 .map(r -> r == null || r.isEmpty() ? tr("<empty>") : r) 325 .distinct() 326 .collect(Collectors.joining("/")); 323 327 List<OsmPrimitive> primitives = new ArrayList<>(n.findRelationMembers(key)); 324 328 primitives.add(0, n); … … 326 330 if (!key.isEmpty()) { 327 331 errors.add(TestError.builder(this, Severity.WARNING, ROLE_UNKNOWN) 328 .message(ROLE_VERIF_PROBLEM_MSG, marktr("Role ''{0}'' is not in templates ''{1}''"), key, templates)332 .message(ROLE_VERIF_PROBLEM_MSG, marktr("Role ''{0}'' is not among expected values ''{1}''"), key, templates) 329 333 .primitives(primitives) 330 334 .build());
Note:
See TracChangeset
for help on using the changeset viewer.