Ignore:
Timestamp:
2016-12-14T15:50:53+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S2259 - Null pointers should not be dereferenced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r11331 r11397  
    213213     */
    214214    protected String getServerKey() {
    215         return getUrlNoException().getHost();
     215        try {
     216            return getUrl().getHost();
     217        } catch (IOException e) {
     218            Main.trace(e);
     219            return null;
     220        }
    216221    }
    217222
     
    255260        Set<ICachedLoaderListener> listeners;
    256261        synchronized (inProgress) {
    257             listeners = inProgress.remove(getUrlNoException().toString());
     262            try {
     263                listeners = inProgress.remove(getUrl().toString());
     264            } catch (IOException e) {
     265                listeners = null;
     266                Main.trace(e);
     267            }
    258268        }
    259269        if (listeners == null) {
Note: See TracChangeset for help on using the changeset viewer.