Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 12810)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 12811)
@@ -42,5 +42,5 @@
 public final class JCSCacheManager {
     private static volatile CompositeCacheManager cacheManager;
-    private static long maxObjectTTL = -1;
+    private static final long maxObjectTTL = -1;
     private static final String PREFERENCE_PREFIX = "jcs.cache";
     public static final BooleanProperty USE_BLOCK_CACHE = new BooleanProperty(PREFERENCE_PREFIX + ".use_block_cache", true);
@@ -55,27 +55,10 @@
     public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY = new IntegerProperty(PREFERENCE_PREFIX + ".max_objects_in_memory", 1000);
 
-    private JCSCacheManager() {
-        // Hide implicit public constructor for utility classes
-    }
-
-    @SuppressWarnings("resource")
-    private static void initialize() throws IOException {
-        File cacheDir = new File(Main.pref.getCacheDirectory(), "jcs");
-
-        if (!cacheDir.exists() && !cacheDir.mkdirs())
-            throw new IOException("Cannot access cache directory");
-
-        File cacheDirLockPath = new File(cacheDir, ".lock");
-        if (!cacheDirLockPath.exists() && !cacheDirLockPath.createNewFile()) {
-            Logging.warn("Cannot create cache dir lock file");
-        }
-        cacheDirLock = new FileOutputStream(cacheDirLockPath).getChannel().tryLock();
-
-        if (cacheDirLock == null)
-            Logging.warn("Cannot lock cache directory. Will not use disk cache");
-
+    private static final Logger jcsLog;
+
+    static {
         // raising logging level gives ~500x performance gain
         // http://westsworld.dk/blog/2008/01/jcs-and-performance/
-        final Logger jcsLog = Logger.getLogger("org.apache.commons.jcs");
+        jcsLog = Logger.getLogger("org.apache.commons.jcs");
         jcsLog.setLevel(Level.INFO);
         jcsLog.setUseParentHandlers(false);
@@ -110,4 +93,25 @@
             }
         });
+    };
+
+    private JCSCacheManager() {
+        // Hide implicit public constructor for utility classes
+    }
+
+    @SuppressWarnings("resource")
+    private static void initialize() throws IOException {
+        File cacheDir = new File(Main.pref.getCacheDirectory(), "jcs");
+
+        if (!cacheDir.exists() && !cacheDir.mkdirs())
+            throw new IOException("Cannot access cache directory");
+
+        File cacheDirLockPath = new File(cacheDir, ".lock");
+        if (!cacheDirLockPath.exists() && !cacheDirLockPath.createNewFile()) {
+            Logging.warn("Cannot create cache dir lock file");
+        }
+        cacheDirLock = new FileOutputStream(cacheDirLockPath).getChannel().tryLock();
+
+        if (cacheDirLock == null)
+            Logging.warn("Cannot lock cache directory. Will not use disk cache");
 
         // this could be moved to external file
