You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/15 05:51:20 UTC
[jira] Assigned: (HARMONY-1163) [classlib][luni] Two consecutive
java.io.ObjectInputStream.readObject() of enum type will trigger an
unspecified StreamCorruptedException
[ http://issues.apache.org/jira/browse/HARMONY-1163?page=all ]
Paulex Yang reassigned HARMONY-1163:
------------------------------------
Assignee: Paulex Yang
> [classlib][luni] Two consecutive java.io.ObjectInputStream.readObject() of enum type will trigger an unspecified StreamCorruptedException
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1163
> URL: http://issues.apache.org/jira/browse/HARMONY-1163
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assigned To: Paulex Yang
>
> Using the enum type below:
> static enum EnumFoo {
> a, b,
> }
> and write the elements of it out :
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(out);
> oos.writeObject(EnumFoo.a);
> oos.writeObject(EnumFoo.b);
> out.flush();
> out.close();
> Then read them in :
> ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
> ObjectInputStream ois = new ObjectInputStream(in);
> Object result = ois.readObject();
> // an unspecified StreamCorruptedException will be thrown out here.
> result = ois.readObject();
> ois.close();
> An unspecified StreamCorruptedException will be thrown out.
> Best regards
> Spark Shen
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira