- Timestamp:
- 2010-03-20T12:02:36+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r3129 r3149 701 701 public void setKeys(Map<String, String> keys) { 702 702 Map<String, String> originalKeys = getKeys(); 703 if (keys == null ) {703 if (keys == null || keys.isEmpty()) { 704 704 this.keys = null; 705 705 keysChangedImpl(originalKeys); … … 731 731 else if (value == null) { 732 732 remove(key); 733 } else if (keys == null || keys.length == 0){733 } else if (keys == null){ 734 734 keys = new String[] {key, value}; 735 735 keysChangedImpl(originalKeys); … … 759 759 */ 760 760 public final void remove(String key) { 761 if (key == null || keys == null || keys.length == 0) return;761 if (key == null || keys == null) return; 762 762 if (!hasKey(key)) 763 763 return; … … 803 803 if (key == null) 804 804 return null; 805 if (keys == null || keys.length == 0)805 if (keys == null) 806 806 return null; 807 807 for (int i=0; i<keys.length;i+=2) { … … 812 812 813 813 public final Collection<String> keySet() { 814 if (keys == null || keys.length == 0)814 if (keys == null) 815 815 return Collections.emptySet(); 816 816 Set<String> result = new HashSet<String>(keys.length / 2); … … 828 828 */ 829 829 public final boolean hasKeys() { 830 return keys != null && keys.length != 0;830 return keys != null; 831 831 } 832 832
Note:
See TracChangeset
for help on using the changeset viewer.