This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: serialVersionUID fixes


Michael Koch wrote:
> 
> >From what I read in the mailinglists and the web I know that
> serialVersionUID in SUNs JDK is calced from their API. We need to
> have the some values in serialVersionUID because of serialization
> between libgcj and JDK versions over net. So I used the JDK 1.4.1
> serialver tool to get some (unfortunately not all) serial versions I
> knew that were missing (using some finds/greps) and added them.
> The only problem I know of is that I missed some classes that are
> indirectly derived from java.io.Serializable. That has to be done.

Hmm, for reasons that I mentioned in my reply to Mark I'm not partial
to the idea of serialVersionUID being explicitly set in all Serializable
classes.  I'm sorry I didn't catch this before you'd gone to the effort
of adding it in a bunch of places.  

> In some classes more serialization work needs to be done. I dont
> implemented the missing special serialization methods where missing.
> Perhaps thats a job for another one or I do it during compiling of
> libgcj. ;-)

Yes, that was the painful part of serialization conformance work for me.
Most of the conformance we got for free once we were compliant with how
serialVersionUID is calculated (and once we fixed places where the
compiler was generating non-conforming .class files), but those special
cases listed in Sun's serialized-form doc were tedious to deal with.
Unfortunately, much of my serialization effort was spent dealing with those 
special cases :-(.
--warrenl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]