John Bollinger 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 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.
This is why I actually use normally a value reflecting the last change of the binary layout, e.g. private static final long serialVersionUID = 20090522L; - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org