Index: /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4021)
+++ /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4022)
@@ -13,4 +13,6 @@
 import java.net.URL;
 import java.net.URLConnection;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.zip.ZipEntry;
@@ -146,8 +148,8 @@
             {
                 String prefKey = getPrefKey(url, destDir);
-                String localPath = Main.pref.get(prefKey);
-                if (localPath != null && localPath.length() > 0)
-                {
-                    String[] lp = localPath.split(";");
+                // FIXME: replace with normal getCollection after july 2011
+                Collection<String> localPath = Main.pref.getCollectionOld(prefKey, ";");
+                if(localPath.size() == 2) {
+                    String[] lp = (String[]) localPath.toArray();
                     File lfile = new File(lp[1]);
                     if(lfile.exists()) {
@@ -176,13 +178,14 @@
         }
         prefKey.append(url.toString());
-        return prefKey.toString();
+        return prefKey.toString().replaceAll("=","_");
     }
 
     private File checkLocal(URL url, String destDir, long maxTime) throws IOException {
         String prefKey = getPrefKey(url, destDir);
-        String localPath = Main.pref.get(prefKey);
         File file = null;
-        if (localPath != null && localPath.length() > 0) {
-            String[] lp = localPath.split(";");
+        // FIXME: replace with normal getCollection after july 2011
+        Collection<String> localPathEntry = Main.pref.getCollectionOld(prefKey, ";");
+        if(localPathEntry.size() == 2) {
+            String[] lp = (String[]) localPathEntry.toArray();
             file = new File(lp[1]);
             if(!file.exists())
@@ -207,5 +210,5 @@
 
         String a = url.toString().replaceAll("[^A-Za-z0-9_.-]", "_");
-        localPath = "mirror_" + a;
+        String localPath = "mirror_" + a;
         destDirFile = new File(destDir, localPath + ".tmp");
         BufferedOutputStream bos = null;
@@ -226,5 +229,6 @@
             file = new File(destDir, localPath);
             destDirFile.renameTo(file);
-            Main.pref.put(prefKey, System.currentTimeMillis() + ";" + file);
+            Main.pref.putCollection(prefKey, Arrays.asList(new String[]
+            {Long.toString(System.currentTimeMillis()), file.toString()}));
         } finally {
             if (bis != null) {
