- Timestamp:
- 2016-07-21T02:17:39+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r10378 r10583 176 176 @Override 177 177 public boolean isNewOrUndeleted() { 178 return (id <= 0) || ((flags & (FLAG_VISIBLE + FLAG_DELETED)) == 0);178 return isNew() || ((flags & (FLAG_VISIBLE + FLAG_DELETED)) == 0); 179 179 } 180 180 -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r10469 r10583 17 17 import java.util.Locale; 18 18 import java.util.Map; 19 import java.util.Objects;20 19 import java.util.Set; 21 20 … … 1385 1384 @Override 1386 1385 public boolean equals(Object obj) { 1387 if (this == obj) return true; 1388 if (obj == null || getClass() != obj.getClass()) return false; 1389 OsmPrimitive that = (OsmPrimitive) obj; 1390 return Objects.equals(id, that.id); 1386 if (this == obj) { 1387 return true; 1388 } else if (obj == null || getClass() != obj.getClass()) { 1389 return false; 1390 } else { 1391 OsmPrimitive that = (OsmPrimitive) obj; 1392 return id == that.id; 1393 } 1391 1394 } 1392 1395 … … 1398 1401 @Override 1399 1402 public int hashCode() { 1400 return Objects.hash(id);1403 return Long.hashCode(id); 1401 1404 } 1402 1405
Note:
See TracChangeset
for help on using the changeset viewer.