Ignore:
Timestamp:
2020-02-22T19:40:25+01:00 (4 years ago)
Author:
simon04
Message:

see #18749 - Intern strings to reduce memory footprint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r15739 r15902  
    397397            min_zoom = i.defaultMinZoom;
    398398            cookies = i.cookies;
    399             icon = i.icon;
     399            icon = i.icon == null ? null : i.icon.intern();
    400400            description = i.description;
    401401            category = i.category != null ? i.category.getCategoryString() : null;
     
    568568        termsOfUseURL = e.terms_of_use_url;
    569569        countryCode = e.country_code;
    570         icon = e.icon;
     570        icon = e.icon == null ? null : e.icon.intern();
    571571        if (e.noTileHeaders != null) {
    572572            noTileHeaders = e.noTileHeaders.toMap();
     
    633633        this.overlay = i.overlay;
    634634        // do not copy field {@code mirrors}
    635         this.icon = i.icon;
     635        this.icon = i.icon == null ? null : i.icon.intern();
    636636        this.isGeoreferenceValid = i.isGeoreferenceValid;
    637637        this.defaultLayers = i.defaultLayers;
     
    11901190     */
    11911191    public void setIcon(String icon) {
    1192         this.icon = icon;
     1192        this.icon = icon == null ? null : icon.intern();
    11931193    }
    11941194
Note: See TracChangeset for help on using the changeset viewer.