harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Liang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-592) java.lang.Enum does not deserialize correctly
Date Tue, 13 Jun 2006 02:59:31 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-592?page=comments#action_12415942 ] 

Richard Liang commented on HARMONY-592:

Hello Tim,

The patch still cannot pass the provided test case. :-) So Please apply my patch.

According to Java Spec 1.5,  
"Enum constants are serialized differently than ordinary serializable or externalizable objects.

To deserialize an enum constant, ObjectInputStream reads the constant name from the stream;
the deserialized constant is then obtained by calling the java.lang.Enum.valueOf method, passing
the constant's enum type along with the received constant name as arguments.

all enum types have a fixed serialVersionUID of 0L. ....

>  java.lang.Enum does not deserialize correctly
> ----------------------------------------------
>          Key: HARMONY-592
>          URL: http://issues.apache.org/jira/browse/HARMONY-592
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang
>  Attachments: 01.Harmony592.diff
> Hello,
> Deserialized Enum object doesn't equal to the original object. The following test will
pass on RI, but fail on Harmony. I will try to attach patch soon :-)
> public void test_serialization() throws Exception {
>         assertTrue(SerializationTester.assertEquals(Sample.CURLY));
>     }
> Best regards,
> Richard

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message