Changeset 15736 in josm
- Timestamp:
- 2020-01-19T23:02:13+01:00 (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r15693 r15736 412 412 } 413 413 if (!i.serverProjections.isEmpty()) { 414 projections = i.serverProjections.stream().collect(Collectors.joining(","));414 projections = String.join(",", i.serverProjections); 415 415 } 416 416 if (i.noTileHeaders != null && !i.noTileHeaders.isEmpty()) { -
trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java
r14399 r15736 7 7 import java.text.DecimalFormatSymbols; 8 8 import java.text.NumberFormat; 9 import java.util.Arrays; 9 10 import java.util.Locale; 10 11 import java.util.Map; … … 170 171 Matcher m = PATTERN_PARAM.matcher(url); 171 172 while (m.find()) { 172 boolean isSupportedPattern = false; 173 for (Pattern pattern : ALL_PATTERNS) { 174 if (pattern.matcher(m.group()).matches()) { 175 isSupportedPattern = true; 176 break; 177 } 178 } 173 boolean isSupportedPattern = Arrays.stream(ALL_PATTERNS) 174 .anyMatch(pattern -> pattern.matcher(m.group()).matches()); 179 175 if (!isSupportedPattern) { 180 176 throw new IllegalArgumentException( -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r14119 r15736 92 92 + "<p><strong>" + tr("Examples") + "</strong></p>" 93 93 + "<ul>" 94 + String.join("", getExamples().stream().map( 95 s -> "<li><a href=\""+s+"\">"+s+"</a></li>").collect(Collectors.toList())) 94 + getExamples().stream() 95 .map(s -> "<li><a href=\""+s+"\">"+s+"</a></li>") 96 .collect(Collectors.joining("")) 96 97 + "</ul>" 97 98 + tr("Note that changeset queries are currently always submitted to ''{0}'', regardless of the " -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r15646 r15736 305 305 if (Logging.isDebugEnabled() && !data.getLayerPrefs().isEmpty()) { 306 306 info.append("<br><br>") 307 .append(String.join("<br>", data.getLayerPrefs().entrySet().stream() 308 .map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.toList()))); 307 .append(data.getLayerPrefs().entrySet().stream() 308 .map(e -> e.getKey() + "=" + e.getValue()) 309 .collect(Collectors.joining("<br>"))); 309 310 } 310 311 -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r14502 r15736 16 16 import java.util.Set; 17 17 import java.util.function.Function; 18 import java.util.stream.Collectors;19 18 20 19 import org.openstreetmap.josm.data.osm.DataSet; … … 347 346 348 347 private static List<AutoCompletionItem> setToList(AutoCompletionSet set, Comparator<AutoCompletionItem> comparator) { 349 List<AutoCompletionItem> list = set.stream().collect(Collectors.toList());348 List<AutoCompletionItem> list = new ArrayList<>(set); 350 349 list.sort(comparator); 351 350 return list; -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r15502 r15736 397 397 // but otherwise the file is invalid and can't even be parsed by SAX anymore 398 398 String k = (e.getPrefix().isEmpty() ? "" : e.getPrefix() + ":") + e.getKey(); 399 String attr = String.join(" ", e.getAttributes().entrySet().stream() 400 .map(a -> encode(a.getKey()) + "=\"" + encode(a.getValue().toString()) + "\"").sorted().collect(Collectors.toList())); 399 String attr = e.getAttributes().entrySet().stream() 400 .map(a -> encode(a.getKey()) + "=\"" + encode(a.getValue().toString()) + "\"") 401 .sorted() 402 .collect(Collectors.joining(" ")); 401 403 if (e.getValue() == null && e.getExtensions().isEmpty()) { 402 404 inline(k, attr); -
trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java
r15442 r15736 129 129 assertEquals(24, primitives.size()); 130 130 assertTrue(primitives.stream() 131 .filter(it -> areEqualNodes(it, new Node(new LatLon(52.5840213, 13.1724145)))) 132 .findAny().isPresent()); 131 .anyMatch(it -> areEqualNodes(it, new Node(new LatLon(52.5840213, 13.1724145))))); 133 132 } 134 133 }
Note:
See TracChangeset
for help on using the changeset viewer.