jdk/test/java/io/RandomAccessFile/ParameterCheck.java
changeset 5810 e83d67ad8c96
parent 5506 202f599c92aa
child 7668 d4a77089c587
--- 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();
         }