sebb wrote:
> Below is a sample of how we might proceed with the removal of
> Serializable from implementations.
>
> Feedback please!

[...]

>      /** Serializable version identifier. */
>      private static final long serialVersionUID = -2036131698031167221L;

I strongly recommend using small integers (i.e. 1 for this version) for the 
serialVersionUID values.  These are more meaningful and easier to maintain.  
Such values also make it clear(er) to maintainers that they must think about 
the value, as opposed to always updating it to match the value that would be 
auto-generated by Java.  (Classes can be changed in ways that do not alter 
their serialized representation, but do change the automatic SUID.)  The only 
advantage to manually declaring the automatic SUID value is for serialization 
compatibility with previous versions of the class, but I'm not sure that's a 
relevant concern in this case.


John

--
John Bollinger
thinma...@yahoo.com


      

Reply via email to