Changeset 13886 in josm


Ignore:
Timestamp:
2018-06-04T00:00:17+02:00 (11 months ago)
Author:
wiktorn
Message:

Fix handling of minimumExpiryTime

File:
1 edited

Legend:

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

    r13825 r13886  
    248248        // at least for some short period of time, but not too long
    249249        if (ret.getExpirationTime() < now + Math.max(MINIMUM_EXPIRES.get(), options.getMinimumExpiryTime())) {
    250             ret.setExpirationTime(now + MINIMUM_EXPIRES.get());
     250            ret.setExpirationTime(now + Math.max(MINIMUM_EXPIRES.get(), TimeUnit.SECONDS.toMillis(options.getMinimumExpiryTime())));
    251251        }
    252252        if (ret.getExpirationTime() > now + Math.max(MAXIMUM_EXPIRES.get(), options.getMinimumExpiryTime())) {
    253             ret.setExpirationTime(now + MAXIMUM_EXPIRES.get());
     253            ret.setExpirationTime(now + Math.max(MAXIMUM_EXPIRES.get(), TimeUnit.SECONDS.toMillis(options.getMinimumExpiryTime())));
    254254        }
    255255        return ret;
Note: See TracChangeset for help on using the changeset viewer.