Changeset 14531 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-12-09T08:15:46+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r14517 r14531 547 547 if (possibleVal.isEmpty()) 548 548 continue; 549 maxPresetValueLen = Math.max(maxPresetValueLen, possibleVal.length()); 549 550 if (harmonizedValue.length() < 3 && possibleVal.length() >= harmonizedValue.length() + MAX_LEVENSHTEIN_DISTANCE) { 550 551 // don't suggest fix value when given value is short and lengths are too different … … 552 553 continue; 553 554 } 554 maxPresetValueLen = Math.max(maxPresetValueLen, possibleVal.length());555 555 int dist = Utils.getLevenshteinDistance(possibleVal, harmonizedValue); 556 if (dist >= harmonizedValue.length()) { 557 // short value, all characters are different. Don't warn, might say Value '10' for key 'fee' looks like 'no'. 558 continue; 559 } 556 560 if (dist < minDist) { 557 561 closest = possibleVal;
Note:
See TracChangeset
for help on using the changeset viewer.