Ticket #6678: 6678.patch

File 6678.patch, 1.3 KB (added by simon04, 13 years ago)
  • src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    diff --git a/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java b/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
    index 0f8dec5..70da4c8 100644
    a b public class ReverseWayTagCorrector extends TagCorrector<Way> {  
    137137                if (newValue.equals(value)) {
    138138                    newValue = invertNumber(value);
    139139                }
    140             } else if (!key.startsWith("name") && !key.endsWith("name")) {
     140            } else if (!ignoreKeyForPrefixSuffixCorrection(key)) {
    141141                for (PrefixSuffixSwitcher prefixSuffixSwitcher : prefixSuffixSwitchers) {
    142142                    newKey = prefixSuffixSwitcher.apply(key);
    143143                    if (!key.equals(newKey)) {
    public class ReverseWayTagCorrector extends TagCorrector<Way> {  
    210210                        + "of the way and its nodes are suggested in order "
    211211                        + "to maintain data consistency."));
    212212    }
     213
     214    private static boolean ignoreKeyForPrefixSuffixCorrection(String key) {
     215        return key.startsWith("name") || key.endsWith("name")
     216                || key.equalsIgnoreCase("fixme") || key.startsWith("note");
     217    }
    213218}