--- old/src/share/classes/sun/applet/Main.java 2013-11-18 10:54:20.000000000 +0400 +++ new/src/share/classes/sun/applet/Main.java 2013-11-18 10:54:20.000000000 +0400 @@ -432,10 +432,8 @@ } // SAVE THE FILE - try { - FileOutputStream out = new FileOutputStream(dotAV); + try (FileOutputStream out = new FileOutputStream(dotAV)) { avProps.store(out, lookup("main.prop.store")); - out.close(); } catch (IOException e) { System.err.println(lookup("main.err.prop.cantsave", dotAV.toString())); @@ -472,13 +470,10 @@ // read the file Properties tmpProps = new Properties(); - try { - FileInputStream in = new FileInputStream(inFile); + try (FileInputStream in = new FileInputStream(inFile)) { tmpProps.load(new BufferedInputStream(in)); - in.close(); } catch (IOException e) { - System.err.println(lookup("main.err.prop.cantread", - inFile.toString())); + System.err.println(lookup("main.err.prop.cantread", inFile.toString())); } // pick off the properties we care about