Ignore:
Timestamp:
2017-06-01T01:20:37+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - squid:S3516 - Methods returns should not be invariant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/PresetLink.java

    r11366 r12288  
    4545        final String presetName = preset_name;
    4646        Optional<TaggingPreset> found = TaggingPresets.getTaggingPresets().stream().filter(preset -> presetName.equals(preset.name)).findFirst();
    47         if (!found.isPresent())
    48             return false;
    49         TaggingPreset t = found.get();
    50         JLabel lbl = new TaggingPresetLabel(t);
    51         lbl.addMouseListener(new TaggingPresetMouseAdapter(t));
    52         p.add(lbl, GBC.eol().fill(GBC.HORIZONTAL));
     47        if (found.isPresent()) {
     48            TaggingPreset t = found.get();
     49            JLabel lbl = new TaggingPresetLabel(t);
     50            lbl.addMouseListener(new TaggingPresetMouseAdapter(t));
     51            p.add(lbl, GBC.eol().fill(GBC.HORIZONTAL));
     52        }
    5353        return false;
    5454    }
Note: See TracChangeset for help on using the changeset viewer.