Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8128)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8129)
@@ -486,7 +486,7 @@
             return;
         }
-        try {
+        try (FileInputStream fis = new FileInputStream(templateFile.toFile())) {
             Properties props = new Properties();
-            props.load(new FileInputStream(templateFile.toFile()));
+            props.load(fis);
             byte[] content = Files.readAllBytes(templateFile);
             File cachePath = Main.pref.getCacheDirectory();
