RFR 8014791: More ProblemList.txt updates (5/2013) (original) (raw)
Chris Hegarty chris.hegarty at oracle.com
Fri May 17 14:40:44 UTC 2013
- Previous message: RFR 8014791: More ProblemList.txt updates (5/2013)
- Next message: hg: jdk8/tl/jdk: 8011136: FileInputStream.available and skip inconsistencies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 17/05/2013 12:22, Alan Bateman wrote:
.... For java/net/HttpURLPermission/HttpURLPermissionTest.java then I assume that using try-with-resources around the code that opens the .ser files will sort this out (meaning might be as quick to just fix this one).
For this, I propose to simply replace the use of the file as a holder for the serial byte, with ByteArrayOutputStream.
hg diff HttpURLPermissionTest.java diff -r fab0e4b682e8 test/java/net/HttpURLPermission/HttpURLPermissionTest.java --- a/test/java/net/HttpURLPermission/HttpURLPermissionTest.java Fri May 17 15🔞40 2013 +0100 +++ b/test/java/net/HttpURLPermission/HttpURLPermissionTest.java Fri May 17 15:34:54 2013 +0100 @@ -187,11 +187,12 @@ public class HttpURLPermissionTest { throws Exception {
HttpURLPermission out = new HttpURLPermission(name, actions);
FileOutputStream fos = new FileOutputStream("out.ser");
ObjectOutputStream o = new ObjectOutputStream(fos);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream o = new ObjectOutputStream(baos); o.writeObject(out);
FileInputStream fis = new FileInputStream("out.ser");
ObjectInputStream i = new ObjectInputStream(fis);
ByteArrayInputStream bain = new
ByteArrayInputStream(baos.toByteArray());
ObjectInputStream i = new ObjectInputStream(bain); HttpURLPermission in = (HttpURLPermission)i.readObject(); if (!in.equals(out)) { System.out.println ("FAIL");
-Chris.
- Previous message: RFR 8014791: More ProblemList.txt updates (5/2013)
- Next message: hg: jdk8/tl/jdk: 8011136: FileInputStream.available and skip inconsistencies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]