This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: serialVersionUID fixes
- From: Warren Levy <WarrenL at cruzio dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Sun, 06 Oct 2002 03:21:32 -0700
- Subject: Re: serialVersionUID fixes
- References: <200210041056.07526.konqueror@gmx.de>
Michael Koch wrote:
>
> I commited the attached little patch to fix some little things.
Hi Michael,
I noticed that you added serialVersionUID initializations in a few files.
I'm curious if you've verified that no other serialization changes were
necessary. IIRC, if our classes were generating a different value from
Sun's serialver, that meant there was a class divergence that needed to
be addressed (or that Sun had modified the class and explicitly set a
value to indicate some backwards compatibility). Hmm, there was also
an issue at one time in how the gcj compiler was generating class files that
had an unexpected, but innocuous, divergence regarding serialVersionUID
calculations; that was another reason for explicitly setting serialVersionUID.
It's been a while since I looked at this so bear with my lack of certainty ;-).
Perhaps this had already been discussed on the list, I must admit I
haven't been as diligent in keeping up with the list as I should, nor
have I had the opportunities I'd hoped to get back to hacking on libgcj
so I may be a bit out of touch; if so, I apologize.
If there is a need to explicitly set a serialVersionUID in the code,
it might be helpful to document/comment the issue(s) of why it was necessary
to do so. That would be helpful in code review, and for folks looking at the
code in the future.
BTW, thank you for putting the effort into enhancing libgcj; especially
for all the work you (and others) have put into java.net. That package
holds a special place in my heart ;-). I gather that the code has changed
significantly from when I first wrote those classes, I'm sure for the better.
--warrenl