- Timestamp:
- 2020-06-14T14:55:29+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r16438 r16628 260 260 if (list.size() == 1) { 261 261 // ways form a single line string 262 return new ArrayList<>(list.iterator().next().getNodes());262 return Collections.unmodifiableList(new ArrayList<>(list.iterator().next().getNodes())); 263 263 } 264 264 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r16505 r16628 283 283 } 284 284 } 285 return result;285 return Collections.unmodifiableList(result); 286 286 } 287 287 -
trunk/src/org/openstreetmap/josm/actions/corrector/TagCorrector.java
r15586 r16628 211 211 } else if (answer != JOptionPane.NO_OPTION) 212 212 throw new UserCancelException(); 213 return commands;213 return Collections.unmodifiableCollection(commands); 214 214 } 215 215 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r16553 r16628 409 409 rels.stream().filter(r -> !dataSet.containsRelation(r)).forEachOrdered(col::add); 410 410 } 411 return col;411 return Collections.unmodifiableCollection(col); 412 412 } 413 413 } -
trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
r16433 r16628 475 475 return Collections.emptyList(); 476 476 } 477 return new ArrayList<>(discussion);477 return Collections.unmodifiableList(discussion); 478 478 } 479 479 -
trunk/src/org/openstreetmap/josm/data/osm/NodeGraph.java
r16445 r16628 375 375 } 376 376 } 377 return result;377 return Collections.unmodifiableSet(result); 378 378 } 379 379 -
trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
r16333 r16628 242 242 } 243 243 errors.addAll(result); 244 return result;244 return Collections.unmodifiableList(result); 245 245 } 246 246 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/data/validation/tests/ConnectivityRelations.java
r16445 r16628 120 120 result.put(laneNumber, connections); 121 121 } 122 return result;122 return Collections.unmodifiableMap(result); 123 123 } 124 124 -
trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
r16119 r16628 86 86 cells.add(cellWays.computeIfAbsent(cell, k -> new ArrayList<>())); 87 87 } 88 return cells;88 return Collections.unmodifiableList(cells); 89 89 } 90 90 -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r16619 r16628 1108 1108 drawImageInside(g, img, anchorImage, anchorScreen, clip); 1109 1109 } 1110 return missedTiles;1110 return Collections.unmodifiableList(missedTiles); 1111 1111 } 1112 1112 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
r16590 r16628 4 4 import java.awt.Color; 5 5 import java.nio.charset.StandardCharsets; 6 import java.util.ArrayList;7 6 import java.util.Arrays; 8 import java.util.Collection;9 7 import java.util.Collections; 10 8 import java.util.List; … … 12 10 import java.util.Map.Entry; 13 11 import java.util.Objects; 14 import java.util.TreeSet;15 12 import java.util.regex.Matcher; 16 13 import java.util.regex.Pattern; … … 41 38 import org.openstreetmap.josm.tools.RightAndLefthandTraffic; 42 39 import org.openstreetmap.josm.tools.RotationAngle; 40 import org.openstreetmap.josm.tools.StreamUtils; 43 41 import org.openstreetmap.josm.tools.Territories; 44 42 import org.openstreetmap.josm.tools.Utils; … … 476 474 if (env.parent == null) { 477 475 if (env.osm != null) { 478 final Collection<String> tags = new TreeSet<>(AlphanumComparator.getInstance());479 476 // we don't have a matched parent, so just search all referrers 480 for (IPrimitive parent : env.osm.getReferrers()) { 481 String value = parent.get(key); 482 if (value != null) { 483 tags.add(value); 484 } 485 } 486 return new ArrayList<>(tags); 477 return env.osm.getReferrers().stream().map(parent -> parent.get(key)) 478 .filter(Objects::nonNull) 479 .distinct() 480 .sorted(AlphanumComparator.getInstance()) 481 .collect(StreamUtils.toUnmodifiableList()); 487 482 } 488 483 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r16553 r16628 819 819 } 820 820 } 821 return dividers;821 return Collections.unmodifiableList(dividers); 822 822 } else 823 823 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
r14946 r16628 182 182 monitor.worked(1); 183 183 } 184 return ret;184 return Collections.unmodifiableList(ret); 185 185 } catch (OsmTransferException e) { 186 186 throw e; -
trunk/src/org/openstreetmap/josm/tools/WinRegistry.java
r14977 r16628 202 202 } 203 203 regCloseKey.invoke(root, getNumber(handles, 0)); 204 return results;204 return Collections.unmodifiableMap(results); 205 205 } 206 206 … … 226 226 } 227 227 regCloseKey.invoke(root, getNumber(handles, 0)); 228 return results;228 return Collections.unmodifiableList(results); 229 229 } 230 230
Note:
See TracChangeset
for help on using the changeset viewer.