Index: trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4637)
+++ trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4638)
@@ -154,8 +154,7 @@
             {
                 String prefKey = getPrefKey(url, destDir);
-                Collection<String> localPath = Main.pref.getCollection(prefKey);
-                if(localPath.size() == 2) {
-                    String[] lp = (String[]) localPath.toArray();
-                    File lfile = new File(lp[1]);
+                List<String> localPath = new ArrayList<String>(Main.pref.getCollection(prefKey));
+                if (localPath.size() == 2) {
+                    File lfile = new File(localPath.get(1));
                     if(lfile.exists()) {
                         lfile.delete();
