Changeset 16436 in josm for trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java
- Timestamp:
- 2020-05-17T12:08:17+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java
r16398 r16436 202 202 */ 203 203 public GpxExtension find(String prefix, String key) { 204 for (GpxExtension child : this) { 205 GpxExtension ext = child.findExtension(prefix, key); 206 if (ext != null) { 207 return ext; 208 } 209 } 210 return null; 204 return this.stream() 205 .map(child -> child.findExtension(prefix, key)).filter(Objects::nonNull) 206 .findFirst().orElse(null); 211 207 } 212 208
Note:
See TracChangeset
for help on using the changeset viewer.