6962419: TEST_BUG: java_io tests fails in samevm mode
Reviewed-by: ohair, sherman
diff --git a/test/java/io/Reader/Skip.java b/test/java/io/Reader/Skip.java
index cc4255b..08f627f 100644
--- a/test/java/io/Reader/Skip.java
+++ b/test/java/io/Reader/Skip.java
@@ -35,12 +35,16 @@
         File f = new File(System.getProperty("test.src", "."),
                           "SkipInput.txt");
         FileReader fr = new FileReader(f);
-        long nchars = 8200;
-        long actual = fr.skip(nchars);
+        try {
+            long nchars = 8200;
+            long actual = fr.skip(nchars);
 
-        if (actual > nchars) {
-            throw new Exception
-                ("Should skip " + nchars + ", but skipped " +actual+" chars");
+            if (actual > nchars) {
+                throw new Exception
+                    ("Should skip " + nchars + ", but skipped " +actual+" chars");
+            }
+        } finally {
+            fr.close();
         }
     }
 }