Changeset 10877 in josm


Ignore:
Timestamp:
2016-08-23T00:45:29+02:00 (3 years ago)
Author:
Don-vip
Message:

see #13416 - add parameter validation do detect NPE origin

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

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

    r10764 r10877  
    2525import org.openstreetmap.josm.data.cache.ICachedLoaderListener.LoadResult;
    2626import org.openstreetmap.josm.data.preferences.IntegerProperty;
     27import org.openstreetmap.josm.tools.CheckParameterUtil;
    2728import org.openstreetmap.josm.tools.HttpClient;
    2829import org.openstreetmap.josm.tools.Utils;
     
    109110            Map<String, String> headers,
    110111            ThreadPoolExecutor downloadJobExecutor) {
    111 
     112        CheckParameterUtil.ensureParameterNotNull(cache, "cache");
    112113        this.cache = cache;
    113114        this.now = System.currentTimeMillis();
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java

    r10723 r10877  
    1717import org.openstreetmap.josm.data.cache.HostLimitQueue;
    1818import org.openstreetmap.josm.data.preferences.IntegerProperty;
     19import org.openstreetmap.josm.tools.CheckParameterUtil;
    1920import org.openstreetmap.josm.tools.Utils;
    2021
     
    4344    public static final IntegerProperty HOST_LIMIT = new IntegerProperty("imagery.tms.tmsloader.maxjobsperhost", 6);
    4445
    45 
    4646    /**
    4747     * separate from JCS thread pool for TMS loader, so we can have different thread pools for default JCS
     
    6464    public TMSCachedTileLoader(TileLoaderListener listener, ICacheAccess<String, BufferedImageCacheEntry> cache,
    6565            int connectTimeout, int readTimeout, Map<String, String> headers) throws IOException {
     66        CheckParameterUtil.ensureParameterNotNull(cache, "cache");
    6667        this.cache = cache;
    6768        this.connectTimeout = connectTimeout;
Note: See TracChangeset for help on using the changeset viewer.