--- old/test/java/util/zip/ZipFile/GetDirEntry.java 2011-02-24 21:45:38.113355858 -0800 +++ new/test/java/util/zip/ZipFile/GetDirEntry.java 2011-02-24 21:45:37.825012718 -0800 @@ -32,12 +32,12 @@ public class GetDirEntry { public static void main(String args[]) throws Exception { - ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."), - "input.jar")); - ZipEntry ze = zf.getEntry("META-INF"); - if (ze == null) { - throw new Exception("failed to find a directory entry"); + try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."), + "input.jar"))) { + ZipEntry ze = zf.getEntry("META-INF"); + if (ze == null) { + throw new Exception("failed to find a directory entry"); + } } - zf.close(); } }