Changeset 17724 in josm
- Timestamp:
- 2021-04-09T10:38:46+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r17655 r17724 8 8 import java.util.Map; 9 9 import java.util.Objects; 10 import java.util.Optional;11 10 import java.util.Set; 12 11 … … 65 64 String id = args.get("id"); 66 65 if (id != null) { 67 Optional<ImageryInfo> byId = ImageryLayerInfo.instance.getLayers().stream()66 return ImageryLayerInfo.instance.getAllDefaultLayers().stream() 68 67 .filter(l -> Objects.equals(l.getId(), id)) 69 .findFirst(); 70 if (byId.isPresent()) { 71 return byId.get(); 72 } 68 .findFirst() 69 .orElseThrow(() -> new IllegalArgumentException("Cannot find layer for id " + id)); 73 70 } 74 71 args.computeIfAbsent("type", ignore -> ImageryType.WMS.getDefault().getTypeString());
Note:
See TracChangeset
for help on using the changeset viewer.