Changeset 7986 in josm
- Timestamp:
- 2015-01-25T03:15:10+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
r7947 r7986 58 58 } 59 59 public AddressError(int code, Collection<OsmPrimitive> collection, String message, String description, String englishDescription) { 60 super(Addresses.this, Severity.WARNING, message, description, englishDescription, code, collection); 60 this(code, Severity.WARNING, collection, message, description, englishDescription); 61 } 62 public AddressError(int code, Severity severity, Collection<OsmPrimitive> collection, String message, String description, 63 String englishDescription) { 64 super(Addresses.this, severity, message, description, englishDescription, code, collection); 61 65 } 62 66 } … … 78 82 } 79 83 if (list.size() > 1) { 80 // no warning if several relations have the same name, see #10945 84 Severity level; 85 // warning level only if several relations have different names, see #10945 81 86 final String name = list.get(0).get("name"); 82 87 if (name == null || Utils.filter(list, new Predicate<Relation>() { … … 86 91 } 87 92 }).size() < list.size()) { 88 List<OsmPrimitive> errorList = new ArrayList<OsmPrimitive>(list); 89 errorList.add(0, p); 90 errors.add(new AddressError(MULTIPLE_STREET_RELATIONS, errorList, tr("Multiple associatedStreet relations"))); 91 } 93 level = Severity.WARNING; 94 } else { 95 level = Severity.OTHER; 96 } 97 List<OsmPrimitive> errorList = new ArrayList<OsmPrimitive>(list); 98 errorList.add(0, p); 99 errors.add(new AddressError(MULTIPLE_STREET_RELATIONS, level, errorList, 100 tr("Multiple associatedStreet relations"), null, null)); 92 101 } 93 102 return list;
Note:
See TracChangeset
for help on using the changeset viewer.