Changeset 12865 in josm for trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
- Timestamp:
- 2017-09-15T01:20:41+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
r11852 r12865 56 56 cell = new Point2D.Double(x0, y0); 57 57 cellNodes.add(cell); 58 List<Way> ways = cellWays.get(cell); 59 if (ways == null) { 60 ways = new ArrayList<>(); 61 cellWays.put(cell, ways); 62 } 63 cells.add(ways); 58 cells.add(cellWays.computeIfAbsent(cell, k -> new ArrayList<>())); 64 59 65 60 // End of the way … … 67 62 if (!cellNodes.contains(cell)) { 68 63 cellNodes.add(cell); 69 ways = cellWays.get(cell); 70 if (ways == null) { 71 ways = new ArrayList<>(); 72 cellWays.put(cell, ways); 73 } 74 cells.add(ways); 64 cells.add(cellWays.computeIfAbsent(cell, k -> new ArrayList<>())); 75 65 } 76 66 … … 87 77 if (!cellNodes.contains(cell)) { 88 78 cellNodes.add(cell); 89 ways = cellWays.get(cell); 90 if (ways == null) { 91 ways = new ArrayList<>(); 92 cellWays.put(cell, ways); 93 } 94 cells.add(ways); 79 cells.add(cellWays.computeIfAbsent(cell, k -> new ArrayList<>())); 95 80 } 96 81 … … 99 84 if (!cellNodes.contains(cell)) { 100 85 cellNodes.add(cell); 101 ways = cellWays.get(cell); 102 if (ways == null) { 103 ways = new ArrayList<>(); 104 cellWays.put(cell, ways); 105 } 106 cells.add(ways); 86 cells.add(cellWays.computeIfAbsent(cell, k -> new ArrayList<>())); 107 87 } 108 88 return cells;
Note:
See TracChangeset
for help on using the changeset viewer.