- Timestamp:
- 2016-10-01T23:11:11+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r10663 r11070 93 93 this.x = x; 94 94 this.y = y; 95 Objects.requireNonNull(objects, "objects"); 95 96 this.nodes = AllNodesVisitor.getAllNodes(objects); 96 97 for (Node n : this.nodes) { … … 106 107 */ 107 108 public MoveCommand(Collection<OsmPrimitive> objects, EastNorth start, EastNorth end) { 108 this(objects, end.getX()-start.getX(), end.getY()-start.getY()); 109 this( 110 Objects.requireNonNull(objects, "objects"), 111 Objects.requireNonNull(end, "end").getX() - Objects.requireNonNull(start, "start").getX(), 112 Objects.requireNonNull(end, "end").getY() - Objects.requireNonNull(start, "start").getY()); 109 113 startEN = start; 110 114 } … … 117 121 */ 118 122 public MoveCommand(OsmPrimitive p, EastNorth start, EastNorth end) { 119 this(Collections.singleton(p), end.getX()-start.getX(), end.getY()-start.getY()); 123 this( 124 Collections.singleton(Objects.requireNonNull(p, "p")), 125 Objects.requireNonNull(end, "end").getX() - Objects.requireNonNull(start, "start").getX(), 126 Objects.requireNonNull(end, "end").getY() - Objects.requireNonNull(start, "start").getY()); 120 127 startEN = start; 121 128 }
Note:
See TracChangeset
for help on using the changeset viewer.