Changeset 18434 in josm for trunk/src/org


Ignore:
Timestamp:
2022-04-21T21:54:17+02:00 (3 years ago)
Author:
taylor.smock
Message:

Dependency updates

JCSCacheManager was modified to move away from methods deprecated in JCS 3.1.

TestUtils was modified so that we are only testing Java versions that byte
buddy might not understand, and to use the non-shaded version of byte buddy
(equalsverifier is no longer a fat jar).

ivy.xml:

tools/ivy.xml:

File:
1 edited

Legend:

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

    r18213 r18434  
    88import java.nio.file.StandardOpenOption;
    99import java.util.Arrays;
     10import java.util.Collections;
    1011import java.util.Properties;
    1112import java.util.logging.Handler;
     
    1718import org.apache.commons.jcs3.JCS;
    1819import org.apache.commons.jcs3.access.CacheAccess;
    19 import org.apache.commons.jcs3.auxiliary.AuxiliaryCache;
    2020import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheFactory;
    2121import org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes;
     
    187187     * @return cache access object
    188188     */
    189     @SuppressWarnings("unchecked")
    190189    public static <K, V> CacheAccess<K, V> getCache(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) {
    191190        CacheAccess<K, V> cacheAccess = getCacheAccess(cacheName, getCacheAttributes(maxMemoryObjects));
     
    195194            try {
    196195                IDiskCacheAttributes diskAttributes = getDiskCacheAttributes(maxDiskObjects, cachePath, cacheName);
    197                 if (cc.getAuxCaches().length == 0) {
    198                     cc.setAuxCaches(new AuxiliaryCache[]{DISK_CACHE_FACTORY.createCache(
    199                             diskAttributes, null, null, new StandardSerializer())});
     196                if (cc.getAuxCacheList().isEmpty()) {
     197                    cc.setAuxCaches(Collections.singletonList(DISK_CACHE_FACTORY.createCache(
     198                            diskAttributes, null, null, new StandardSerializer())));
    200199                }
    201200            } catch (Exception e) { // NOPMD
    202201                // in case any error in setting auxiliary cache, do not use disk cache at all - only memory
    203                 cc.setAuxCaches(new AuxiliaryCache[0]);
     202                cc.setAuxCaches(Collections.emptyList());
    204203                Logging.debug(e);
    205204            }
Note: See TracChangeset for help on using the changeset viewer.