Changeset 16453 in josm for trunk/src/org
- Timestamp:
- 2020-05-17T19:53:25+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
r16438 r16453 117 117 Date timestamp = p.getReferrers().stream() 118 118 .filter(ref -> !ref.isTimestampEmpty()) 119 .findFirst() 119 120 .map(AbstractPrimitive::getTimestamp) 120 . findFirst().orElse(null);121 .orElse(null); 121 122 toLoad.put(p, timestamp); 122 123 } -
trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
r16445 r16453 457 457 return relation.keySet().stream() 458 458 .filter(m -> m.endsWith(nameTag)) 459 .findFirst() 459 460 .map(relation::get) 460 . findFirst().orElse(null);461 .orElse(null); 461 462 } else if (nameTag.startsWith("?") && OsmUtils.isTrue(relation.get(nameTag.substring(1)))) { 462 463 return tr(nameTag.substring(1)); -
trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
r16451 r16453 765 765 mv = osm.get(key); 766 766 if (!caseSensitive && mv == null) { 767 mv = osm.keySet().stream().filter(key::equalsIgnoreCase). map(osm::get).findFirst().orElse(null);767 mv = osm.keySet().stream().filter(key::equalsIgnoreCase).findFirst().map(osm::get).orElse(null); 768 768 } 769 769 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r16438 r16453 301 301 return rbStrategy.entrySet().stream() 302 302 .filter(e -> e.getValue().isSelected()) 303 .findFirst() 303 304 .map(Entry::getKey) 304 . findFirst().orElse(null);305 .orElse(null); 305 306 } 306 307 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
r16438 r16453 372 372 .filter(i -> i.memberExpression != null && i.memberExpression.match(osm)) 373 373 .filter(i -> i.types == null || i.types.isEmpty() || i.types.contains(TaggingPresetType.forPrimitive(osm))) 374 .findFirst() 374 375 .map(i -> i.key) 375 . findFirst().orElse(null);376 .orElse(null); 376 377 } 377 378 return null; -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenPopupMenu.java
r16438 r16453 59 59 .entrySet().stream() 60 60 .filter(e -> MOUSE_GRABBER_KEY.equals(Objects.toString(e.getKey()))) 61 .findFirst() 61 62 .map(Entry::getValue) 62 . findFirst().orElse(null);63 .orElse(null); 63 64 final ChangeListener changeListener = (ChangeListener) mouseGrabber; 64 65 final AWTEventListener awtEventListener = (AWTEventListener) mouseGrabber; -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r16448 r16453 159 159 .mapToObj(i -> getUI().getAccessibleChild(this, i)) 160 160 .filter(child -> child instanceof ComboPopup) 161 .findFirst() 161 162 .map(child -> ((ComboPopup) child).getList()) 162 . findFirst().orElse(null);163 .orElse(null); 163 164 } 164 165 -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r16450 r16453 36 36 import java.util.ListIterator; 37 37 import java.util.Map; 38 import java.util.Objects;39 38 40 39 import javax.swing.UIManager; … … 780 779 return split.getChildren().stream() 781 780 .filter(child -> child.getBounds().contains(x, y)) 781 .findFirst() 782 782 .map(child -> dividerAt(child, x, y)) 783 .filter(Objects::nonNull) 784 .findFirst().orElse(null); 783 .orElse(null); 785 784 } 786 785 return null;
Note:
See TracChangeset
for help on using the changeset viewer.