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 30340)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java	(revision 30436)
@@ -35,24 +35,18 @@
     public SevenZipReader(InputStream in, AbstractDataSetHandler handler, boolean promptUser) throws IOException {
         super(handler, handler != null ? handler.getArchiveHandler() : null, promptUser);
-        OutputStream out = null;
-        try {
-            // Write entire 7z file as a temp file on disk as we need random access later, and "in" can be a network stream
-            File tmpFile = File.createTempFile("7z_", ".7z", OdUtils.createTempDir());
-            out = new FileOutputStream(tmpFile);
+        // Write entire 7z file as a temp file on disk as we need random access later, and "in" can be a network stream
+        File tmpFile = File.createTempFile("7z_", ".7z", OdUtils.createTempDir());
+        try (OutputStream out = new FileOutputStream(tmpFile)) {
             Utils.copyStream(in, out);
-            Utils.close(out);
-            out = null;
-            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);
+        }
+        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();
             }
-        } finally {
-            Utils.close(out);
+            throw new IOException(message);
         }
     }
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleDownloadTask.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleDownloadTask.java	(revision 30340)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleDownloadTask.java	(revision 30436)
@@ -22,5 +22,4 @@
 import org.openstreetmap.josm.plugins.opendata.OdPlugin;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
-import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -92,6 +91,4 @@
 
     protected void download(ModuleInformation pi, File file) throws ModuleDownloadException{
-        OutputStream out = null;
-        InputStream in = null;
         try {
             if (pi.downloadlink == null) {
@@ -108,12 +105,13 @@
                 downloadConnection.connect();
             }
-            in = downloadConnection.getInputStream();
-            out = new FileOutputStream(file);
-            byte[] buffer = new byte[8192];
-            for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
-                out.write(buffer, 0, read);
+            try (
+                InputStream in = downloadConnection.getInputStream();
+                OutputStream out = new FileOutputStream(file)
+            ) {
+                byte[] buffer = new byte[8192];
+                for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
+                    out.write(buffer, 0, read);
+                }
             }
-            out.close();
-            in.close();
         } catch(MalformedURLException e) {
             String msg = tr("Warning: Cannot download module ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", pi.name, pi.downloadlink);
@@ -125,9 +123,7 @@
             throw new ModuleDownloadException(e);
         } finally {
-            Utils.close(in);
             synchronized(this) {
                 downloadConnection = null;
             }
-            Utils.close(out);
         }
     }
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadLocalModuleInformationTask.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadLocalModuleInformationTask.java	(revision 30340)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadLocalModuleInformationTask.java	(revision 30436)
@@ -174,7 +174,5 @@
 
     protected void processLocalModuleInformationFile(File file) throws ModuleListParseException{
-        FileInputStream fin = null;
-        try {
-            fin = new FileInputStream(file);
+        try (FileInputStream fin = new FileInputStream(file)) {
             List<ModuleInformation> pis = new ModuleListParser().parse(fin);
             for (ModuleInformation pi : pis) {
@@ -187,6 +185,4 @@
         } catch(IOException e) {
             throw new ModuleListParseException(e);
-        } finally {
-            Utils.close(fin);
         }
     }
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java	(revision 30340)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java	(revision 30436)
@@ -33,5 +33,4 @@
 import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -142,5 +141,4 @@
      */
     protected String downloadModuleList(String site, ProgressMonitor monitor) {
-        BufferedReader in = null;
         StringBuilder sb = new StringBuilder();
         try {
@@ -159,10 +157,11 @@
                 connection.setRequestProperty("Accept-Charset", "utf-8");
             }
-            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
-            String line;
-            while((line = in.readLine()) != null) {
-                sb.append(line).append("\n");
-            }
-            return sb.toString();
+            try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"))) {
+                String line;
+                while((line = in.readLine()) != null) {
+                    sb.append(line).append("\n");
+                }
+                return sb.toString();
+            }
         } catch(MalformedURLException e) {
             if (canceled) return null;
@@ -180,5 +179,4 @@
                 connection = null;
             }
-            Utils.close(in);
             monitor.finishTask();
         }
@@ -192,6 +190,4 @@
      */
     protected void downloadModuleIcons(String site, File destFile, ProgressMonitor monitor) {
-        InputStream in = null;
-        OutputStream out = null;
         try {
             site = site.replaceAll("%<(.*)>", "");
@@ -207,12 +203,13 @@
                 connection.setRequestProperty("Host", url.getHost());
             }
-            in = connection.getInputStream();
-            out = new FileOutputStream(destFile);
-            byte[] buffer = new byte[8192];
-            for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
-                out.write(buffer, 0, read);
-            }
-            out.close();
-            in.close();
+            try (
+                InputStream in = connection.getInputStream();
+                OutputStream out = new FileOutputStream(destFile)
+            ) {
+                byte[] buffer = new byte[8192];
+                for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
+                    out.write(buffer, 0, read);
+                }
+            }
         } catch(MalformedURLException e) {
             if (canceled) return;
@@ -230,5 +227,4 @@
                 connection = null;
             }
-            Utils.close(in);
             monitor.finishTask();
         }
