Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 18433)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 18434)
@@ -8,4 +8,5 @@
 import java.nio.file.StandardOpenOption;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Properties;
 import java.util.logging.Handler;
@@ -17,5 +18,4 @@
 import org.apache.commons.jcs3.JCS;
 import org.apache.commons.jcs3.access.CacheAccess;
-import org.apache.commons.jcs3.auxiliary.AuxiliaryCache;
 import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheFactory;
 import org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes;
@@ -187,5 +187,4 @@
      * @return cache access object
      */
-    @SuppressWarnings("unchecked")
     public static <K, V> CacheAccess<K, V> getCache(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) {
         CacheAccess<K, V> cacheAccess = getCacheAccess(cacheName, getCacheAttributes(maxMemoryObjects));
@@ -195,11 +194,11 @@
             try {
                 IDiskCacheAttributes diskAttributes = getDiskCacheAttributes(maxDiskObjects, cachePath, cacheName);
-                if (cc.getAuxCaches().length == 0) {
-                    cc.setAuxCaches(new AuxiliaryCache[]{DISK_CACHE_FACTORY.createCache(
-                            diskAttributes, null, null, new StandardSerializer())});
+                if (cc.getAuxCacheList().isEmpty()) {
+                    cc.setAuxCaches(Collections.singletonList(DISK_CACHE_FACTORY.createCache(
+                            diskAttributes, null, null, new StandardSerializer())));
                 }
             } catch (Exception e) { // NOPMD
                 // in case any error in setting auxiliary cache, do not use disk cache at all - only memory
-                cc.setAuxCaches(new AuxiliaryCache[0]);
+                cc.setAuxCaches(Collections.emptyList());
                 Logging.debug(e);
             }
