Ticket #11397: 11397_NPE.patch

File 11397_NPE.patch, 1.1 KB (added by wiktorn, 10 years ago)
  • src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java

    diff --git src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java
    index 5d4ae08..b792c94 100644
     
    22package org.openstreetmap.josm.data.cache;
    33
    44import java.util.HashMap;
    5 import java.util.Map;
    65
    76import org.apache.commons.jcs.engine.ElementAttributes;
    87
    import org.apache.commons.jcs.engine.ElementAttributes;  
    1413 */
    1514public class CacheEntryAttributes extends ElementAttributes {
    1615    private static final long serialVersionUID = 1L; //version
    17     private transient Map<String, String> attrs = new HashMap<String, String>();
     16    private HashMap<String, String> attrs = new HashMap<String, String>(); // type needs to be HashMap to guarantee serialization and silence Sonar
    1817    private final static String NO_TILE_AT_ZOOM = "noTileAtZoom";
    1918    private final static String ETAG = "Etag";
    2019    private final static String LAST_MODIFICATION = "lastModification";