Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 4811)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 4812)
@@ -200,5 +200,5 @@
         for (String source : sources.split(";")) {
             try {
-                MirroredInputStream s = new MirroredInputStream(source, OsmValidator.getValidatorDir(), -1);
+                MirroredInputStream s = new MirroredInputStream(source);
                 InputStreamReader r;
                 try {
Index: /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4811)
+++ /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4812)
@@ -24,4 +24,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -69,5 +70,5 @@
                 }
             } else {
-                if(Main.applet) {
+                if (Main.applet) {
                     URLConnection conn = url.openConnection();
                     conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
@@ -80,5 +81,5 @@
             }
         } catch (java.net.MalformedURLException e) {
-            if(name.startsWith("resource://")) {
+            if (name.startsWith("resource://")) {
                 fs = getClass().getResourceAsStream(
                         name.substring("resource:/".length()));
@@ -161,5 +162,5 @@
                     }
                 }
-                Main.pref.put(prefKey, null);
+                Main.pref.putCollection(prefKey, null);
             }
         } catch (java.net.MalformedURLException e) {}
@@ -174,8 +175,4 @@
         StringBuilder prefKey = new StringBuilder("mirror.");
         if (destDir != null) {
-            String prefDir = Main.pref.getPreferencesDir();
-            if (destDir.startsWith(prefDir)) {
-                destDir = destDir.substring(prefDir.length());
-            }
             prefKey.append(destDir);
             prefKey.append(".");
@@ -198,5 +195,5 @@
                         || maxTime <= 0 // arbitrary value <= 0 is deprecated
                 ) {
-                    maxTime = Main.pref.getInteger("mirror.maxtime", 7*24*60*60);
+                    maxTime = Main.pref.getInteger("mirror.maxtime", 7*24*60*60); // one week
                 }
                 age = System.currentTimeMillis() - Long.parseLong(localPathEntry.get(0));
@@ -206,6 +203,6 @@
             }
         }
-        if(destDir == null) {
-            destDir = Main.pref.getPreferencesDir();
+        if (destDir == null) {
+            destDir = Main.pref.getCacheDirectory().getPath();
         }
 
@@ -252,18 +249,6 @@
             }
         } finally {
-            if (bis != null) {
-                try {
-                    bis.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-            if (bos != null) {
-                try {
-                    bos.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
+            Utils.close(bis);
+            Utils.close(bos);
         }
 
