- Timestamp:
- 2021-04-20T23:52:31+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r17805 r17809 46 46 47 47 if (selected) { 48 if (s.selectedStyle == null) { 49 s.selectedStyle = new DividedScale<>(); 50 } 51 s.selectedStyle.put(o, r); 48 s.selectedStyle = (s.selectedStyle == null ? new DividedScale<StyleElementList>() : s.selectedStyle).put(o, r); 52 49 } else { 53 if (s.plainStyle == null) { 54 s.plainStyle = new DividedScale<>(); 55 } 56 s.plainStyle.put(o, r); 50 s.plainStyle = (s.plainStyle == null ? new DividedScale<StyleElementList>() : s.plainStyle).put(o, r); 57 51 } 58 52 return s.intern(); … … 82 76 @Override 83 77 public boolean equals(Object obj) { 84 if (obj == null) { 85 return false; 86 } 87 if (getClass() != obj.getClass()) { 88 return false; 89 } 78 if (obj == null) return false; 79 if (getClass() != obj.getClass()) return false; 90 80 final StyleCache other = (StyleCache) obj; 91 81 return Objects.equals(plainStyle, other.plainStyle) && Objects.equals(selectedStyle, other.selectedStyle);
Note:
See TracChangeset
for help on using the changeset viewer.