Ignore:
Timestamp:
2015-06-04T12:02:09+02:00 (9 years ago)
Author:
stoecker
Message:

fix case insensitive comparison for key:valuefragment search

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r8461 r8466  
    482482
    483483        public KeyValue(String key, String value, boolean regexSearch, boolean caseSensitive) throws ParseError {
    484             this.caseSensitive = caseSensitive;
     484        this.caseSensitive = caseSensitive;
    485485            if (regexSearch) {
    486486                int searchFlags = regexFlags(caseSensitive);
     
    509509                this.valuePattern = null;
    510510            } else {
    511                 this.key = key.toLowerCase(Locale.ENGLISH);
     511                this.key = key;
    512512                this.value = value;
    513513                this.keyPattern = null;
     
    551551                } else {
    552552                    mv = osm.get(key);
     553                    if(!caseSensitive && mv == null) {
     554                        for (String k: osm.keySet()) {
     555                            if(key.equalsIgnoreCase(k)) {
     556                                mv = osm.get(k);
     557                                break;
     558                            }
     559                        }
     560                    }
    553561                }
    554562
Note: See TracChangeset for help on using the changeset viewer.