--- a/jdk/test/java/io/Serializable/oldTests/ArraysOfArrays.java Fri Jun 18 09:35:22 2010 -0700
+++ b/jdk/test/java/io/Serializable/oldTests/ArraysOfArrays.java Fri Jun 18 20:59:13 2010 +0100
@@ -31,14 +31,15 @@
import java.io.*;
public class ArraysOfArrays {
- public static void main (String argv[]) {
+ public static void main (String argv[]) throws IOException {
System.err.println("\nRegression test for testing of " +
"serialization/deserialization of objects as " +
"arrays of arrays \n");
FileInputStream istream = null;
+ FileOutputStream ostream = null;
try {
- FileOutputStream ostream = new FileOutputStream("piotest5.tmp");
+ ostream = new FileOutputStream("piotest5.tmp");
ObjectOutputStream p = new ObjectOutputStream(ostream);
byte b[][] = {{ 0, 1}, {2,3}};
@@ -207,6 +208,9 @@
throw new Error();
}
throw new Error();
+ } finally {
+ if (istream != null) istream.close();
+ if (ostream != null) ostream.close();
}
}
}