Changeset 9087 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2015-12-05T16:09:41+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r8870 r9087 81 81 * @param nodes Nodes to be aligned. 82 82 * @return A array of two nodes. 83 * @throws IllegalArgumentException if nodes is empty 83 84 */ 84 85 private static Node[] nodePairFurthestApart(List<Node> nodes) { … … 93 94 else 94 95 waysRef.retainAll(ref); 96 } 97 98 if (waysRef == null) { 99 throw new IllegalArgumentException(); 95 100 } 96 101 -
trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
r8870 r9087 212 212 * @param nodes nodes to distribute 213 213 * @return Commands to execute to perform action 214 * @throws IllegalArgumentException if nodes is empty 214 215 */ 215 216 private static Collection<Command> distributeNodes(Collection<Node> nodes) { … … 234 235 } 235 236 237 if (nodea == null || nodeb == null) { 238 throw new IllegalArgumentException(); 239 } 240 236 241 // Remove the nodes A and B from the list of nodes to move 237 242 nodes.remove(nodea); … … 266 271 } 267 272 268 // First move the node to A's position, then move it towards B 269 double dx = ax - s.getEastNorth().east() + (bx-ax)*pos/num; 270 double dy = ay - s.getEastNorth().north() + (by-ay)*pos/num; 271 272 cmds.add(new MoveCommand(s, dx, dy)); 273 274 //remove moved node from the list 275 nodes.remove(s); 273 if (s != null) { 274 // First move the node to A's position, then move it towards B 275 double dx = ax - s.getEastNorth().east() + (bx-ax)*pos/num; 276 double dy = ay - s.getEastNorth().north() + (by-ay)*pos/num; 277 278 cmds.add(new MoveCommand(s, dx, dy)); 279 280 //remove moved node from the list 281 nodes.remove(s); 282 } 276 283 } 277 284 -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r9067 r9087 765 765 * @param isInner - if true, reverts the direction (for multipolygon islands) 766 766 * @return list of parts, marked with the inside orientation. 767 * @throws IllegalArgumentException if parts is empty 767 768 */ 768 769 private List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) { … … 796 797 } 797 798 } 799 } 800 801 if (topWay == null || topNode == null) { 802 throw new IllegalArgumentException(); 798 803 } 799 804 … … 855 860 856 861 //iterate till full circle is reached 857 while ( true) {862 while (curWay != null) { 858 863 859 864 //add cur way -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r8931 r9087 418 418 way = w; 419 419 } 420 } 421 if (way == null) { 422 return false; 420 423 } 421 424 List<Node> oldNodes = way.getNodes();
Note:
See TracChangeset
for help on using the changeset viewer.