Changeset 12537 in josm for trunk/src/org/openstreetmap/josm/corrector
- Timestamp:
- 2017-07-30T00:22:46+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/corrector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java
r12279 r12537 36 36 * Tags that imply a semantic meaning from the way direction and cannot be changed. 37 37 */ 38 private static final TagCollection directionalTags= new TagCollection(Arrays.asList(38 private static final TagCollection DIRECTIONAL_TAGS = new TagCollection(Arrays.asList( 39 39 new Tag("natural", "coastline"), 40 40 new Tag("natural", "cliff"), … … 54 54 for (Map.Entry<String, String> entry : way.getKeys().entrySet()) { 55 55 final Tag tag = new Tag(entry.getKey(), entry.getValue()); 56 final boolean isDirectional = directionalTags.contains(tag) || tag.isDirectionKey();56 final boolean isDirectional = DIRECTIONAL_TAGS.contains(tag) || tag.isDirectionKey(); 57 57 if (isDirectional) { 58 58 final boolean cannotBeCorrected = ReverseWayTagCorrector.getTagCorrections(tag).isEmpty(); -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r12412 r12537 53 53 } 54 54 55 private static final Collection<Pattern> ignoredKeys= new ArrayList<>();55 private static final Collection<Pattern> IGNORED_KEYS = new ArrayList<>(); 56 56 static { 57 57 for (String s : OsmPrimitive.getUninterestingKeys()) { 58 ignoredKeys.add(getPatternFor(s));58 IGNORED_KEYS.add(getPatternFor(s)); 59 59 } 60 60 for (String s : new String[]{"name", "ref", "tiger:county"}) { 61 ignoredKeys.add(getPatternFor(s, false));61 IGNORED_KEYS.add(getPatternFor(s, false)); 62 62 } 63 63 for (String s : new String[]{"tiger:county", "turn:lanes", "change:lanes", "placement"}) { 64 ignoredKeys.add(getPatternFor(s, true));64 IGNORED_KEYS.add(getPatternFor(s, true)); 65 65 } 66 66 } … … 292 292 293 293 private static boolean ignoreKeyForCorrection(String key) { 294 for (Pattern ignoredKey : ignoredKeys) {294 for (Pattern ignoredKey : IGNORED_KEYS) { 295 295 if (ignoredKey.matcher(key).matches()) { 296 296 return true;
Note: See TracChangeset
for help on using the changeset viewer.