Changeset 14704 in josm for trunk/src


Ignore:
Timestamp:
2019-01-19T17:52:54+01:00 (6 years ago)
Author:
GerdP
Message:

fix #17219 TagChecker.isTagInPresets() doesn't work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r14696 r14704  
    396396     */
    397397    public static boolean isKeyInPresets(String key) {
    398         return getPresetValues(key) != null;
     398        return TaggingPresets.getPresetValues(key) != null;
    399399    }
    400400
     
    408408    public static boolean isTagInPresets(String key, String value) {
    409409        final Set<String> values = getPresetValues(key);
    410         return values != null && (values.isEmpty() || values.contains(value));
     410        return values != null && values.contains(value);
    411411    }
    412412
     
    451451    public static boolean isTagIgnored(String key, String value) {
    452452        if (isKeyIgnored(key))
     453            return true;
     454        final Set<String> values = getPresetValues(key);
     455        if (values != null && values.isEmpty())
    453456            return true;
    454457        if (!isTagInPresets(key, value)) {
Note: See TracChangeset for help on using the changeset viewer.