You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Boris Kuznetsov <bo...@gmail.com> on 2006/06/14 12:48:04 UTC

Re: [jira] Commented: (HARMONY-592) java.lang.Enum does not deserialize correctly

I think that unspecified protected method readResolve() in Enum is
against the spec. So, ObjectInputStream should be fixed.

Best regards,
Boris Kuznetsov
Intel Middleware Products Division


On 6/14/06, Tim Ellison <t....@gmail.com> wrote:
> Thanks for the link Richard.
>
> Looks like we will need to put support for Enum right into the
> ObjectStreams.  I'm therefore not convinced that your patch is the right
> thing to do.  Anyone else care to comment?
>
> Regards,
> Tim
>
> Richard Liang wrote:
> > Tim Ellison wrote:
> >> Richard Liang (JIRA) wrote:
> >>
> >>> 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. ....
> >>> "
> >>>
> >>
> >> Where abouts did you find that text?  I'm looking at the javadoc.
> >>
> >>
> > Hello Tim,
> >
> > Please find it at
> > http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/serial-arch.html#6469
> >
> >
> > Thanks a lot.
> >> Regards,
> >> Tim
> >>
> >>
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


--

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org