diff -r 6e38efd0293f -r e83d67ad8c96 jdk/test/java/io/InputStream/OpsAfterClose.java --- a/jdk/test/java/io/InputStream/OpsAfterClose.java Fri Jun 18 20:59:13 2010 +0100 +++ b/jdk/test/java/io/InputStream/OpsAfterClose.java Sat Jun 19 15:17:36 2010 +0100 @@ -125,23 +125,35 @@ f.deleteOnExit(); FileInputStream fis = new FileInputStream(f); - if (testInputStream(fis)) { - failed = true; - } - if (testFileInputStream(fis)) { - failed = true; + try { + if (testInputStream(fis)) { + failed = true; + } + if (testFileInputStream(fis)) { + failed = true; + } + } finally { + fis.close(); } BufferedInputStream bs = new BufferedInputStream( new FileInputStream(f)); - if (testInputStream(bs)) { - failed = true; + try { + if (testInputStream(bs)) { + failed = true; + } + } finally { + bs.close(); } DataInputStream dis = new DataInputStream( new FileInputStream(f)); - if (testInputStream(dis)) { - failed = true; + try { + if (testInputStream(dis)) { + failed = true; + } + } finally { + dis.close(); } PushbackInputStream pbis = new PushbackInputStream(