commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [MATH] Moving Serializable from interfaces to implementations
Date Fri, 22 May 2009 15:44:19 GMT
On 22/05/2009, John Bollinger <thinman42@yahoo.com> wrote:
>
>
>  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 left this unchanged.

> 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.
>

I agree with the above; perhaps the best approach would be to change
the UID when the class has been reviewed to ensure that the docs and
impl. are OK?

>  John
>
>
>  --
>  John Bollinger
>  thinman42@yahoo.com
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message