Ignore:
Timestamp:
2020-05-17T19:53:25+02:00 (4 years ago)
Author:
simon04
Message:

see #19251, see #19252 - fix findFirst/map/orElse sequence

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r16448 r16453  
    159159                .mapToObj(i -> getUI().getAccessibleChild(this, i))
    160160                .filter(child -> child instanceof ComboPopup)
     161                .findFirst()
    161162                .map(child -> ((ComboPopup) child).getList())
    162                 .findFirst().orElse(null);
     163                .orElse(null);
    163164    }
    164165
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r16450 r16453  
    3636import java.util.ListIterator;
    3737import java.util.Map;
    38 import java.util.Objects;
    3938
    4039import javax.swing.UIManager;
     
    780779            return split.getChildren().stream()
    781780                    .filter(child -> child.getBounds().contains(x, y))
     781                    .findFirst()
    782782                    .map(child -> dividerAt(child, x, y))
    783                     .filter(Objects::nonNull)
    784                     .findFirst().orElse(null);
     783                    .orElse(null);
    785784        }
    786785        return null;
Note: See TracChangeset for help on using the changeset viewer.