harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy, Jing Lv (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1163) [classlib][luni] Two consecutive java.io.ObjectInputStream.readObject() of enum type will trigger an unspecified StreamCorruptedException
Date Wed, 16 Aug 2006 07:02:15 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1163?page=all ]

Jimmy, Jing Lv updated HARMONY-1163:
------------------------------------

    Attachment: Harmony-1163.zip

Hi,

   Would you please try my patch? Thanks!

Best Regards,
Jimmy

> [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
>         Attachments: Harmony-1163.zip
>
>
> 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

        

Mime
View raw message