Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java	(revision 30737)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java	(revision 30738)
@@ -74,8 +74,5 @@
 
         if (isZip) {
-            ZipFile zipFile = null;
-            try
-            {
-                zipFile = new ZipFile(m_file);
+            try (ZipFile zipFile = new ZipFile(m_file)) {
                 ZipEntry imgEntry = null;
                 Enumeration<? extends ZipEntry> entries = zipFile.entries();
@@ -103,11 +100,4 @@
                 System.err.println(tr("Warning: failed to handle zip file ''{0}''. Exception was: {1}", m_file.getName(), e.toString()));
                 return null;
-            } finally {
-                if (zipFile != null) {
-                    try {
-                        zipFile.close();
-                    } catch (IOException ex) {
-                    }
-                }
             }
         } else {
@@ -149,8 +139,5 @@
 
         if (isZip) {
-            ZipFile zipFile = null;
-            try
-            {
-                zipFile = new ZipFile(m_file);
+            try (ZipFile zipFile = new ZipFile(m_file)) {
                 String calFileStr = imgNameInZip + CalibrationFileFilter.EXTENSION;
                 ZipEntry calEntry = zipFile.getEntry(calFileStr);
@@ -183,13 +170,6 @@
                 }
             } catch (Exception e) {
-                System.err.println(tr("Warning: failed to handle zip file ''{0}''. Exception was: {1}", m_file.getName(), e.toString()));
+                Main.warn(tr("Warning: failed to handle zip file ''{0}''. Exception was: {1}", m_file.getName(), e.toString()));
                 return;
-            } finally {
-                if (zipFile != null) {
-                    try {
-                        zipFile.close();
-                    } catch (IOException ex) {
-                    }
-                }
             }
         } else {
