geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <>
Subject Re: Standard for serialVersionUID
Date Thu, 31 Aug 2006 21:10:49 GMT
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.


View raw message