Ticket #21438: 21438.patch
File 21438.patch, 1.7 KB (added by , 3 years ago) |
---|
-
src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresets.java
204 204 /** 205 205 * Return set of values for a key in the tagging presets 206 206 * @param key the key 207 * @return set of values for a key in the tagging presets or null if none is found207 * @return set of values for a key in the tagging presets 208 208 */ 209 209 public static Set<String> getPresetValues(String key) { 210 210 Set<String> values = PRESET_TAG_CACHE.get(key); 211 211 if (values != null) 212 212 return Collections.unmodifiableSet(values); 213 return null;213 return Collections.emptySet(); 214 214 } 215 215 216 216 /** -
src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
545 545 */ 546 546 private static Set<String> getPresetValues(String key) { 547 547 Set<String> res = TaggingPresets.getPresetValues(key); 548 if ( res != null)548 if (!Utils.isEmpty(res)) 549 549 return res; 550 550 if (additionalPresetsValueData.contains(key)) 551 551 return Collections.emptySet(); … … 560 560 * @since 9023 561 561 */ 562 562 public static boolean isKeyInPresets(String key) { 563 return TaggingPresets.getPresetValues(key) != null;563 return !Utils.isEmpty(TaggingPresets.getPresetValues(key)); 564 564 } 565 565 566 566 /**