commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elijah Zupancic <eli...@apache.org>
Subject Re: [chain2] serialVersionUID
Date Tue, 24 Jul 2012 06:04:00 GMT
Thanks Jörg!

It sounds like we will need to change them all in chain because we
have changed the package name.

-Elijah

On Mon, Jul 23, 2012 at 10:51 PM, Jörg Schaible
<Joerg.Schaible@scalaris.com> wrote:
> Hi Elijah
>
> Elijah Zupancic wrote:
>
>> Hi everyone,
>>
>> Now that we have changed the chain API to not be backwards compatible
>> in the 2.0 release, should we change the version number in the
>> serialVersionUID fields as well? It seems to me that would make sense,
>> but I'm a bit of a newbie when it comes to managing their versions. I
>> was wondering if anyone else has experience with regards to best
>> practices?
>
> The serialVersionUID of a class has to be changed if its binary layout
> changes:
> - the class or an inherited class has been renamed or moved to a different
> package
> - the field types of the (inherited) members have been changed or changed
> between transient/non-transient
> - the *order* of one of the (inherited) fields have been changed
> - serialization methods have
> (writeObject/readObject/writeReplace/readResolve) been added/removed in the
> class hierarchy in an incompatible way
> - the implementation of those methods have been changed in an incompatible
> way
>
> Basically, the serialVersionUID has to be changed if you cannot load a .ser
> file anymore with an instance of that class which was written with the old
> version.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Mime
View raw message