Changeset 18277 in josm
- Timestamp:
- 2021-10-17T06:10:48+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r18211 r18277 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)) … … 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 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresets.java
r18258 r18277 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) { … … 211 211 if (values != null) 212 212 return Collections.unmodifiableSet(values); 213 return null;213 return Collections.emptySet(); 214 214 } 215 215
Note:
See TracChangeset
for help on using the changeset viewer.