Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 19462)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 19463)
@@ -243,5 +243,7 @@
      */
     public byte[] getByteContent() throws IOException {
-        return getInputStream().readAllBytes();
+        try (InputStream is = getInputStream()) {
+            return is.readAllBytes();
+        }
     }
 
