Ignore:
Timestamp:
2017-07-31T23:34:29+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:S4034 - "Stream.anyMatch()" should be preferred

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r12523 r12549  
    206206    private boolean containsDataKey(String key) {
    207207        return IntStream.range(0, tagData.getRowCount())
    208                 .filter(i -> key.equals(tagData.getValueAt(i, 0)) /* sic! do not use getDataKey*/
    209                     && !((Map<String, Integer>) tagData.getValueAt(i, 1)).containsKey("") /* sic! do not use getDataValues*/)
    210                 .findAny().isPresent();
     208                .anyMatch(i -> key.equals(tagData.getValueAt(i, 0)) /* sic! do not use getDataKey*/
     209                    && !((Map<String, Integer>) tagData.getValueAt(i, 1)).containsKey("") /* sic! do not use getDataValues*/);
    211210    }
    212211
Note: See TracChangeset for help on using the changeset viewer.