Ignore:
Timestamp:
2017-09-13T16:30:27+02:00 (8 years ago)
Author:
bastiK
Message:

see #15229 - fix deprecations caused by [12840]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r12620 r12841  
    381381            if (!"file".equals(url.getProtocol())) {
    382382                String prefKey = getPrefKey(url, destDir);
    383                 List<String> localPath = new ArrayList<>(Main.pref.getCollection(prefKey));
     383                List<String> localPath = new ArrayList<>(Main.pref.getList(prefKey));
    384384                if (localPath.size() == 2) {
    385385                    File lfile = new File(localPath.get(1));
     
    388388                    }
    389389                }
    390                 Main.pref.putCollection(prefKey, null);
     390                Main.pref.putList(prefKey, null);
    391391            }
    392392        } catch (MalformedURLException e) {
     
    419419        Long ifModifiedSince = null;
    420420        File localFile = null;
    421         List<String> localPathEntry = new ArrayList<>(Main.pref.getCollection(prefKey));
     421        List<String> localPathEntry = new ArrayList<>(Main.pref.getList(prefKey));
    422422        boolean offline = false;
    423423        try {
     
    476476                if (localFile == null)
    477477                    throw new AssertionError();
    478                 Main.pref.putCollection(prefKey,
     478                Main.pref.putList(prefKey,
    479479                        Arrays.asList(Long.toString(System.currentTimeMillis()), localPathEntry.get(1)));
    480480                return localFile;
     
    488488            localFile = new File(destDir, localPath);
    489489            if (Main.platform.rename(destDirFile, localFile)) {
    490                 Main.pref.putCollection(prefKey,
     490                Main.pref.putList(prefKey,
    491491                        Arrays.asList(Long.toString(System.currentTimeMillis()), localFile.toString()));
    492492            } else {
Note: See TracChangeset for help on using the changeset viewer.