--- a/jdk/test/java/io/RandomAccessFile/ParameterCheck.java Fri Jun 18 20:59:13 2010 +0100
+++ b/jdk/test/java/io/RandomAccessFile/ParameterCheck.java Sat Jun 19 15:17:36 2010 +0100
@@ -44,6 +44,7 @@
private static void doTest(String method) throws Exception {
File fn = new File("x.ParameterCheck");
+ RandomAccessFile raf = null;
try {
byte b[] = new byte[32];
@@ -55,7 +56,7 @@
fout.write(i);
}
fout.close();
- RandomAccessFile raf = new RandomAccessFile(fn , "rw");
+ raf = new RandomAccessFile(fn , "rw");
System.err.println("-----------------------------" +
"-----------------------------");
@@ -125,6 +126,8 @@
System.err.println("-----------------------------" +
"-----------------------------");
} finally {
+ if (raf != null)
+ raf.close();
fn.delete();
}