Ignore:
Timestamp:
2016-12-13T01:57:37+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1066 - Collapsible "if" statements should be merged

File:
1 edited

Legend:

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

    r11288 r11385  
    849849            case ANY_VALUE_REGEXP:
    850850            case EXACT_REGEXP:
    851                 for (String key: osm.keySet()) {
    852                     if (keyPattern.matcher(key).matches()) {
    853                         if (mode == Mode.ANY_VALUE_REGEXP
    854                                 || valuePattern.matcher(osm.get(key)).matches())
    855                             return true;
    856                     }
     851                for (String k : osm.keySet()) {
     852                    if (keyPattern.matcher(k).matches()
     853                            && (mode == Mode.ANY_VALUE_REGEXP || valuePattern.matcher(osm.get(k)).matches()))
     854                        return true;
    857855                }
    858856                return false;
Note: See TracChangeset for help on using the changeset viewer.