- Timestamp:
- 2022-12-21T19:27:55+01:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r18516 r18617 624 624 } 625 625 // Defensive copy of keys 626 String[] newKeys = keys; 626 final String[] tKeys = this.keys; // Used to avoid highly unlikely NPE (from a race) during clone operation. 627 String[] newKeys = tKeys == null ? null : tKeys.clone(); 627 628 Map<String, String> originalKeys = getKeys(); 628 629 List<Map.Entry<String, String>> tagsToAdd = new ArrayList<>(tags.size()); … … 630 631 if (!Utils.isBlank(tag.getKey())) { 631 632 int keyIndex = indexOfKey(newKeys, tag.getKey()); 632 // Realistically, we will not hit the newKeys == null branch. If it is null, keyIndex is always < 1633 // Realistically, we will not hit the newKeys == null branch. If it is null, keyIndex is always < 0 633 634 if (keyIndex < 0 || newKeys == null) { 634 635 tagsToAdd.add(tag);
Note:
See TracChangeset
for help on using the changeset viewer.