Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java	(revision 30806)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java	(revision 30908)
@@ -33,5 +33,5 @@
 
     private final IInArchive archive = new Handler();
-
+    
     public SevenZipReader(InputStream in, AbstractDataSetHandler handler, boolean promptUser) throws IOException {
         super(handler, handler != null ? handler.getArchiveHandler() : null, promptUser);
@@ -41,22 +41,24 @@
             Utils.copyStream(in, out);
         }
-        try (IInStream random = new MyRandomAccessFile(tmpFile.getPath(), "r")) {
-            if (archive.Open(random) != 0) {
-                String message = "Unable to open 7z archive: "+tmpFile.getPath();
-                Main.warn(message);
-                if (!tmpFile.delete()) {
-                    tmpFile.deleteOnExit();
-                }
-                throw new IOException(message);
+        // random must be kept open for later extracting
+        @SuppressWarnings("resource")
+        IInStream random = new MyRandomAccessFile(tmpFile.getPath(), "r");
+        if (archive.Open(random) != 0) {
+            String message = "Unable to open 7z archive: "+tmpFile.getPath();
+            Main.warn(message);
+            random.close();
+            if (!tmpFile.delete()) {
+                tmpFile.deleteOnExit();
             }
+            throw new IOException(message);
         }
     }
-
-    public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser)
+    
+    public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 
             throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException {
         return new SevenZipReader(in, handler, promptUser).parseDoc(instance);
     }
 
-    public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser)
+    public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 
             throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException {
         return new SevenZipReader(in, handler, promptUser).parseDocs(instance);
@@ -68,11 +70,13 @@
     }
 
-    @Override protected void extractArchive(File temp, List<File> candidates) throws IOException, FileNotFoundException {
+    @Override
+    protected void extractArchive(File temp, List<File> candidates) throws IOException, FileNotFoundException {
         archive.Extract(null, -1, IInArchive.NExtract_NAskMode_kExtract, new ExtractCallback(archive, temp, candidates));
+        archive.close();
     }
-
+    
     private class ExtractCallback extends ArchiveExtractCallback {
         private final List<File> candidates;
-
+        
         public ExtractCallback(IInArchive archive, File tempDir, List<File> candidates) {
             Init(archive);
@@ -81,5 +85,5 @@
         }
 
-        @Override
+        @Override 
         public int GetStream(int index, OutputStream[] outStream, int askExtractMode) throws IOException {
             int res = super.GetStream(index, outStream, askExtractMode);
