commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Bollinger <>
Subject Re: [MATH] Moving Serializable from interfaces to implementations
Date Fri, 22 May 2009 15:36:49 GMT

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 Bollinger

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message