Changeset 6169 in josm
- Timestamp:
- 2013-08-21T10:14:51+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/coor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
r6167 r6169 16 16 * @since 6162 17 17 */ 18 abstract class Coordinate implements Cloneable,Serializable {18 abstract class Coordinate implements Serializable { 19 19 20 20 protected final double x; … … 105 105 if (this == obj) 106 106 return true; 107 if ( getClass() != obj.getClass())107 if (obj == null || getClass() != obj.getClass()) 108 108 return false; 109 109 Coordinate other = (Coordinate) obj; -
trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
r6167 r6169 9 9 * @author Imi 10 10 */ 11 public class EastNorth extends Coordinate {11 public class EastNorth extends Coordinate implements Cloneable { 12 12 13 13 public EastNorth(double east, double north) { … … 132 132 133 133 @Override 134 public EastNorth clone() {135 return new EastNorth(x, y);134 public EastNorth clone() throws CloneNotSupportedException { 135 return (EastNorth) super.clone(); 136 136 } 137 137 } -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r6168 r6169 26 26 * @author Imi 27 27 */ 28 public class LatLon extends Coordinate {28 public class LatLon extends Coordinate implements Cloneable { 29 29 30 30 /** … … 397 397 398 398 @Override 399 public LatLon clone() {400 return new LatLon(x, y);399 public LatLon clone() throws CloneNotSupportedException { 400 return (LatLon) super.clone(); 401 401 } 402 402 }
Note:
See TracChangeset
for help on using the changeset viewer.