Ignore:
Timestamp:
2017-01-12T02:36:14+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib:SPP_USE_CONTAINSKEY - Style - Method calls keySet() just to call contains, use containsKey instead

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java

    r10345 r11461  
    150150        if (relation == null) return false;
    151151        DialogContext context = new DialogContext(layer, relation);
    152         return openDialogs.keySet().contains(context);
    153 
     152        return openDialogs.containsKey(context);
    154153    }
    155154
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r11366 r11461  
    8888
    8989    private void show(long id, HistoryBrowserDialog dialog) {
    90         if (dialogs.values().contains(dialog)) {
     90        if (dialogs.containsValue(dialog)) {
    9191            show(id);
    9292        } else {
     
    9898
    9999    private void show(long id) {
    100         if (dialogs.keySet().contains(id)) {
     100        if (dialogs.containsKey(id)) {
    101101            dialogs.get(id).toFront();
    102102        }
Note: See TracChangeset for help on using the changeset viewer.