Changeset 4684 in josm for trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
- Timestamp:
- 2011-12-21T12:58:59+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r4682 r4684 648 648 */ 649 649 public boolean hasSameTags(OsmPrimitive other) { 650 return getKeys().equals(other.getKeys()); 650 // We cannot directly use Arrays.equals(keys, other.keys) as keys is not ordered by key 651 // but we can at least check if both arrays are null or of the same size before creating 652 // and comparing the key maps (costly operation, see #7159) 653 return (keys == null && other.keys == null) 654 || (keys != null && other.keys != null && keys.length == other.keys.length && (keys.length == 0 || getKeys().equals(other.getKeys()))); 651 655 } 652 656
Note:
See TracChangeset
for help on using the changeset viewer.