classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wanted: SerialVersionUID experts ;)


From: Stuart Ballard
Subject: Wanted: SerialVersionUID experts ;)
Date: Fri, 23 Sep 2005 16:37:36 -0400

Tom pointed out a little problem with Japitools' serialVersionUID
calculation. In his words:

On 23 Sep 2005 10:21:39 -0600, Tom Tromey <address@hidden> wrote:
> I see this in the japi pages:
>
>     * class
>        java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider:
>        SerialVersionUID=7078212910685744490 in jdk14, but
>        SerialVersionUID=861278251667444782 in classpath
>
> ... but when I look by hand at the jdk I see something else:
>
> opsy. serialver 
> java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
> java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider:    
> static final long serialVersionUID = 861278251667444782L;

I've confirmed both facts for myself: Japize, including the CVS
version, comes up with 7078... for this class in the JDK, but
serialver says it's 8612...

Since svuid calculation is almost impossible to debug, I thought I'd
post to the list and see if anyone here had worked on this for
Classpath or gcj and whether they have any tricks to figure out why
the value from Japize isn't matching what Sun says.

The CVS version of Japize has some svuid-calculation bugs anyway, but
I can debug those ones by adding printlns and comparing to the
released version. But I don't have the faintest idea how to compare
against Sun's version which I don't have the luxury of adding printlns
to ;)

In Japize, the svuid is calculated in ClassFile.java using code
heavily based on ObjectStreamClass from classpath, but comparing the
two didn't yield any enlightenment. All the differences seem to be due
to the fact that ObjectStreamClass is working with reflected classes
while ClassFile is working with its own objects.

One interesting test that I'm not sure how to do would be to see what
value Classpath's ObjectStreamClass would get for *Sun's* version of
BCSSServiceProvider. If Classpath gets it right I could debug by
adding printlns there too. If not... we've found a Classpath bug.

Any suggestions?

Stuart.

--
http://sab39.dev.netreach.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]