You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Heinz Drews <he...@gmail.com> on 2006/09/01 00:17:56 UTC

Re: Standard for serialVersionUID

I will create a jira.

Should there be a vote about the format of the uid?

--heinz

On 8/31/06, Jason Dillon <ja...@planet57.com> wrote:
> On Aug 31, 2006, at 7:01 AM, Zakharov, Vasily M wrote:
> > Note however, that small values like 1 or 2 are traditionally used as
> > serialVersionUIDs for synthetic and other system classes, like
> > Enums and
> > RMI Stubs, that are serialized in a special way. So using such
> > values in
> > "normal" classes may confuse the future readers of the code and make
> > them wonder if that particular class is serialized in a special
> > way. So
> > I'm suggesting using traditional (20-digit or so) values for
> > serialVersionUIDs.
>
> I think that using the short versions... 1, 2, 3, 4... is fine for
> any serializable.  Its much easier to manage too and much easier to
> debug when mismatch problems arise, since you can see which version
> is older and how old... using the generated longass versions just
> shows you they are different, not which is older.
>
> --jason
>
>
>

Re: Standard for serialVersionUID

Posted by Jason Dillon <ja...@planet57.com>.
Eh... probably.

--jason


On Aug 31, 2006, at 3:17 PM, Heinz Drews wrote:

> I will create a jira.
>
> Should there be a vote about the format of the uid?
>
> --heinz
>
> On 8/31/06, Jason Dillon <ja...@planet57.com> wrote:
>> On Aug 31, 2006, at 7:01 AM, Zakharov, Vasily M wrote:
>> > Note however, that small values like 1 or 2 are traditionally  
>> used as
>> > serialVersionUIDs for synthetic and other system classes, like
>> > Enums and
>> > RMI Stubs, that are serialized in a special way. So using such
>> > values in
>> > "normal" classes may confuse the future readers of the code and  
>> make
>> > them wonder if that particular class is serialized in a special
>> > way. So
>> > I'm suggesting using traditional (20-digit or so) values for
>> > serialVersionUIDs.
>>
>> I think that using the short versions... 1, 2, 3, 4... is fine for
>> any serializable.  Its much easier to manage too and much easier to
>> debug when mismatch problems arise, since you can see which version
>> is older and how old... using the generated longass versions just
>> shows you they are different, not which is older.
>>
>> --jason
>>
>>
>>