- Timestamp:
- 2020-03-09T00:48:59+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r15934 r16101 19 19 import java.util.Set; 20 20 import java.util.TreeSet; 21 import java.util.concurrent.ConcurrentHashMap;22 21 import java.util.concurrent.TimeUnit; 23 22 import java.util.regex.Matcher; … … 305 304 private boolean isGeoreferenceValid; 306 305 /** which layers should be activated by default on layer addition. **/ 307 private List<DefaultLayer> defaultLayers = new ArrayList<>();306 private List<DefaultLayer> defaultLayers = Collections.emptyList(); 308 307 /** HTTP headers **/ 309 private Map<String, String> customHttpHeaders = new ConcurrentHashMap<>();308 private Map<String, String> customHttpHeaders = Collections.emptyMap(); 310 309 /** Should this map be transparent **/ 311 310 private boolean transparent = true; … … 588 587 } 589 588 } 590 customHttpHeaders = e.customHttpHeaders;589 setCustomHttpHeaders(e.customHttpHeaders); 591 590 transparent = e.transparent; 592 591 minimumTileExpire = e.minimumTileExpire; … … 635 634 this.icon = intern(i.icon); 636 635 this.isGeoreferenceValid = i.isGeoreferenceValid; 637 this.defaultLayers = i.defaultLayers;638 this.customHttpHeaders = i.customHttpHeaders;636 setDefaultLayers(i.defaultLayers); 637 setCustomHttpHeaders(i.customHttpHeaders); 639 638 this.transparent = i.transparent; 640 639 this.minimumTileExpire = i.minimumTileExpire; … … 1571 1570 */ 1572 1571 public void setDefaultLayers(List<DefaultLayer> layers) { 1573 this.defaultLayers = layers;1572 this.defaultLayers = Utils.toUnmodifiableList(layers); 1574 1573 } 1575 1574 … … 1579 1578 */ 1580 1579 public Map<String, String> getCustomHttpHeaders() { 1581 if (customHttpHeaders == null) {1582 return Collections.emptyMap();1583 }1584 1580 return customHttpHeaders; 1585 1581 } … … 1590 1586 */ 1591 1587 public void setCustomHttpHeaders(Map<String, String> customHttpHeaders) { 1592 this.customHttpHeaders = customHttpHeaders;1588 this.customHttpHeaders = Utils.toUnmodifiableMap(customHttpHeaders); 1593 1589 } 1594 1590
Note:
See TracChangeset
for help on using the changeset viewer.