Ignore:
Timestamp:
2016-09-05T23:50:16+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S1226 - Method parameters, caught exceptions and foreach variables should not be reassigned

File:
1 edited

Legend:

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

    r10762 r10965  
    201201        IDiskCacheAttributes ret;
    202202        removeStaleFiles(cachePath + File.separator + cacheName, USE_BLOCK_CACHE.get() ? "_INDEX_v2" : "_BLOCK_v2");
    203         cacheName = cacheName + (USE_BLOCK_CACHE.get() ? "_BLOCK_v2" : "_INDEX_v2");
     203        String newCacheName = cacheName + (USE_BLOCK_CACHE.get() ? "_BLOCK_v2" : "_INDEX_v2");
    204204
    205205        if (USE_BLOCK_CACHE.get()) {
     
    211211             * wants to reduce the file size, (s)he may just go to preferences and there it should be handled (by removing old file)
    212212             */
    213             File diskCacheFile = new File(cachePath + File.separator + cacheName + ".data");
     213            File diskCacheFile = new File(cachePath + File.separator + newCacheName + ".data");
    214214            if (diskCacheFile.exists()) {
    215215                blockAttr.setMaxKeySize((int) Math.max(maxDiskObjects, diskCacheFile.length()/1024));
     
    231231            ret.setDiskPath(cachePath);
    232232        }
    233         ret.setCacheName(cacheName);
     233        ret.setCacheName(newCacheName);
    234234
    235235        return ret;
Note: See TracChangeset for help on using the changeset viewer.