Changeset 8846 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2015-10-10T01:40:42+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/TestError.java
r8840 r8846 232 232 type = "n"; 233 233 } 234 strings.add(type + "_"+ o.getId());234 strings.add(type + '_' + o.getId()); 235 235 } 236 236 for (String o : strings) { … … 243 243 String ignorestring = getIgnoreGroup(); 244 244 if (descriptionEn != null) { 245 ignorestring += "_"+ descriptionEn;245 ignorestring += '_' + descriptionEn; 246 246 } 247 247 return ignorestring; … … 381 381 @Override 382 382 public String toString() { 383 return "TestError [tester=" + tester + ", code=" + code + ", message=" + message + "]";383 return "TestError [tester=" + tester + ", code=" + code + ", message=" + message + ']'; 384 384 } 385 385 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r8777 r8846 99 99 protected static final int DUPLICATE_NODE_WATERWAY = 17; 100 100 101 private static final String[] TYPES = { 102 "none", "highway", "railway", "waterway", "boundary", "power", "natural", "landuse", "building"}; 103 101 104 /** The map of potential duplicates. 102 105 * … … 168 171 169 172 Map<String, Boolean> typeMap = new HashMap<>(); 170 String[] types = {"none", "highway", "railway", "waterway", "boundary", "power", "natural", "landuse", "building"};171 173 172 174 // check whether we have multiple nodes at the same position with the same tag set … … 175 177 if (mm.get(tagSet).size() > 1) { 176 178 177 for (String type: types) {178 typeMap.put(type, false);179 for (String type: TYPES) { 180 typeMap.put(type, Boolean.FALSE); 179 181 } 180 182 … … 190 192 for (String type: typeMap.keySet()) { 191 193 if (keys.containsKey(type)) { 192 typeMap.put(type, true);194 typeMap.put(type, Boolean.TRUE); 193 195 typed = true; 194 196 } 195 197 } 196 198 if (!typed) { 197 typeMap.put("none", true);199 typeMap.put("none", Boolean.TRUE); 198 200 } 199 201 } 200 202 } 201 202 203 } 203 204 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/InternetTags.java
r8510 r8846 102 102 String ending = ""; 103 103 if (domain.contains("/")) { 104 int idx = domain.indexOf( "/");104 int idx = domain.indexOf('/'); 105 105 ending = domain.substring(idx, domain.length()); 106 106 domain = domain.substring(0, idx); -
trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java
r8382 r8846 45 45 protected void checkNumberOfLanesByKey(final OsmPrimitive p, String lanesKey, String message) { 46 46 final Collection<String> keysForPattern = new ArrayList<>(Utils.filter(p.keySet(), 47 Predicates.stringContainsPattern(Pattern.compile( ":" + lanesKey + "$"))));47 Predicates.stringContainsPattern(Pattern.compile(':' + lanesKey + '$')))); 48 48 keysForPattern.removeAll(Arrays.asList(BLACKLIST)); 49 49 if (keysForPattern.isEmpty()) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r8840 r8846 126 126 @Override 127 127 public String toString() { 128 return "GroupedMapCSSRule [selectors=" + selectors + ", declaration=" + declaration + "]";128 return "GroupedMapCSSRule [selectors=" + selectors + ", declaration=" + declaration + ']'; 129 129 } 130 130 } … … 301 301 check.alternatives.add(val); 302 302 } else if ("assertMatch".equals(ai.key) && val != null) { 303 check.assertions.put(val, true);303 check.assertions.put(val, Boolean.TRUE); 304 304 } else if ("assertNoMatch".equals(ai.key) && val != null) { 305 check.assertions.put(val, false);305 check.assertions.put(val, Boolean.FALSE); 306 306 } else { 307 throw new IllegalDataException("Cannot add instruction " + ai.key + ": " + ai.val + "!");307 throw new IllegalDataException("Cannot add instruction " + ai.key + ": " + ai.val + '!'); 308 308 } 309 309 } … … 619 619 @Override 620 620 public String toString() { 621 return "MapCSSTagCheckerAndRule [rule=" + rule + "]";621 return "MapCSSTagCheckerAndRule [rule=" + rule + ']'; 622 622 } 623 623 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
r8510 r8846 240 240 @Override 241 241 public String toString() { 242 return "replaceAll(" + regExpr + ", " + replacement + ")";242 return "replaceAll(" + regExpr + ", " + replacement + ')'; 243 243 } 244 244 } … … 304 304 @Override 305 305 public String toString() { 306 return "synonyms(" + replacement + ", " + Arrays.toString(words) + ")";306 return "synonyms(" + replacement + ", " + Arrays.toString(words) + ')'; 307 307 } 308 308 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r8840 r8846 241 241 } 242 242 } catch (IOException e) { 243 errorSources += source + "\n";243 errorSources += source + '\n'; 244 244 } 245 245 } -
trunk/src/org/openstreetmap/josm/data/validation/util/MultipleNameVisitor.java
r8378 r8846 63 63 displayName = name; 64 64 } else { 65 displayName = size + " "+ trn(multipleClassname, multiplePluralClassname, size);65 displayName = size + ' ' + trn(multipleClassname, multiplePluralClassname, size); 66 66 if (multipleName.length() > 0) { 67 67 if (multipleName.length() <= MULTIPLE_NAME_MAX_LENGTH) {
Note:
See TracChangeset
for help on using the changeset viewer.