Index: /trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 5838)
+++ /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 5839)
@@ -40,6 +40,10 @@
             in = new BufferedReader(new InputStreamReader(resource.openStream(), "UTF-8"));
             StringBuffer sb = new StringBuffer();
-            for (String line = in.readLine(); line != null; line = in.readLine()) {
-                sb.append(line).append("\n");
+            try {
+                for (String line = in.readLine(); line != null; line = in.readLine()) {
+                    sb.append(line).append("\n");
+                }
+            } finally {
+                in.close();
             }
             s = sb.toString();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 5838)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 5839)
@@ -323,4 +323,5 @@
                 UTFInputStreamReader in = UTFInputStreamReader.create(u.openStream(), "utf-8");
                 String r = new Scanner(in).useDelimiter("\\A").next();
+                in.close();
                 System.out.println("Successfully loaded Bing attribution data.");
                 return r.getBytes("utf-8");
Index: /trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 5838)
+++ /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 5839)
@@ -469,15 +469,19 @@
                 return false;
         }
-        try
-        {
-            if(load(en.openStream(), tr.openStream(), false))
-            {
+        InputStream enStream = null;
+        InputStream trStream = null;
+        try {
+            enStream = en.openStream();
+            trStream = tr.openStream();
+            if (load(enStream, trStream, false)) {
                 pluralMode = languages.get(l);
                 loadedCode = l;
                 return true;
             }
-        }
-        catch(IOException e)
-        {
+        } catch(IOException e) {
+            // Ignore exception
+        } finally {
+            if (trStream != null) try {trStream.close();} catch(IOException e) {}
+            if (enStream != null) try {enStream.close();} catch(IOException e) {}
         }
         return false;
