Ignore:
Timestamp:
2015-08-02T12:14:18+02:00 (9 years ago)
Author:
wiktorn
Message:

Small TMS fixes.

  • fix handling of minimum and maximum expiration times (tiles were usually set for expiration at 1 month instead what headers returned)
  • fix right-click menu command "Load tile" not reloading the tiles
  • fix null pointer dereference reported by Coverity
File:
1 edited

Legend:

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

    r8635 r8636  
    252252        // keep the expiration time between MINIMUM_EXPIRES and MAXIMUM_EXPIRES, so we will cache the tiles
    253253        // at least for some short period of time, but not too long
    254         if (ret.getExpirationTime() < MINIMUM_EXPIRES) {
     254        if (ret.getExpirationTime() < now + MINIMUM_EXPIRES) {
    255255            ret.setExpirationTime(now + MINIMUM_EXPIRES);
    256256        }
    257         if (ret.getExpirationTime() > MAXIMUM_EXPIRES) {
     257        if (ret.getExpirationTime() > now + MAXIMUM_EXPIRES) {
    258258            ret.setExpirationTime(now + MAXIMUM_EXPIRES);
    259259        }
Note: See TracChangeset for help on using the changeset viewer.