[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: serialVersionUID
From: |
Brian Jones |
Subject: |
Re: serialVersionUID |
Date: |
28 Sep 2002 10:36:21 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
I've added this information to the hacking document, thanks Eric.
Brian
Eric Blake <address@hidden> writes:
> If a class has a field (of any accessibility) named serialVersionUID
> of type long, that is what serialver uses. Otherwise it computes a
> value using some sort of hash function on the names of all method
> signatures in the .class file. I'm not sure whether the methods are
> sorted first, or what the hash function is. The fact that different
> compilers create different synthetic method signatures, such as
> access$0() if an inner class needs access to a private member of an
> enclosing class, make it impossible for two distinct compilers to
> reliably generate the same serial #, because their .class files
> differ. However, once you have a .class file, its serial # is unique,
> and the computation will give the same result no matter what platform
> you execute on.
>
> Giannis Georgalis wrote:
> > Thank you Eric, I however had to run the serialver tool on a
> > i386/solaris8 system (I didn't want to install sun's SDK on my
> > computer, just for the serialver tool). Does the output match
> > every system ? Is there a posibility that there are different
> > serialVersionUIDs for different systems?
> >
>
> --
> This signature intentionally left boring.
>
> Eric Blake address@hidden
> BYU student, free software programmer
>
>
>
>
> _______________________________________________
> Classpath mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/classpath
>
--
Brian Jones <address@hidden>