Index: trunk/src/org/openstreetmap/josm/io/OsmImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 5203)
+++ trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 5205)
@@ -51,10 +51,15 @@
     @Override
     public void importData(File file, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
+        FileInputStream in = null;
         try {
-            FileInputStream in = new FileInputStream(file);
+            in = new FileInputStream(file);
             importData(in, file);
         } catch (FileNotFoundException e) {
             e.printStackTrace();
             throw new IOException(tr("File ''{0}'' does not exist.", file.getName()));
+        } finally {
+            if (in != null) {
+                in.close();
+            }
         }
     }
