Changeset 14949 in josm for trunk/src/org
- Timestamp:
- 2019-04-01T19:43:51+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r14948 r14949 404 404 } 405 405 406 private static boolean containsUnusualUnicodeCharacter(String s) {407 return s != null && s.chars().anyMatch(c -> isUnusualUnicodeBlock(UnicodeBlock.of(c)));408 } 409 410 private static boolean isUnusualUnicodeBlock( UnicodeBlock b) {411 return b == UnicodeBlock.IPA_EXTENSIONS ;406 private static boolean containsUnusualUnicodeCharacter(String key, String value) { 407 return value != null && value.chars().anyMatch(c -> isUnusualUnicodeBlock(key, UnicodeBlock.of(c))); 408 } 409 410 private static boolean isUnusualUnicodeBlock(String key, UnicodeBlock b) { 411 return b == UnicodeBlock.IPA_EXTENSIONS && !key.endsWith(":pronunciation"); 412 412 } 413 413 … … 549 549 withErrors.put(p, "ICV"); 550 550 } 551 if ((containsUnusualUnicodeCharacter( value)) && !withErrors.contains(p, "UUCV")) {551 if ((containsUnusualUnicodeCharacter(key, value)) && !withErrors.contains(p, "UUCV")) { 552 552 errors.add(TestError.builder(this, Severity.WARNING, UNUSUAL_UNICODE_CHAR_VALUE) 553 553 .message(tr("Tag value contains unusual Unicode character"), s, key)
Note:
See TracChangeset
for help on using the changeset viewer.