Ignore:
Timestamp:
2015-05-17T22:48:00+02:00 (11 years ago)
Author:
wiktorn
Message:

addresses #11437 - properly pass information about errors during load from cache to upper layers

File:
1 edited

Legend:

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

    r8345 r8389  
    364364                    continue;
    365365                }
     366
     367                attributes.setResponseCode(urlConn.getResponseCode());
    366368                byte[] raw = read(urlConn);
    367369
    368370                if (!cacheAsEmpty(urlConn.getHeaderFields(), urlConn.getResponseCode(), raw) &&
    369371                        raw != null && raw.length > 0) {
     372                    // we need to check cacheEmpty, so for cases, when data is returned, but we want to store
     373                    // as empty (eg. empty tile images) to save some space
    370374                    cacheData = createCacheEntry(raw);
    371375                    cache.put(getCacheKey(), cacheData, attributes);
Note: See TracChangeset for help on using the changeset viewer.