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-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org