>> For serialisation to work properly as an object changes through versions
>> we are advised to provide a serialVersionUID which is a static final
[quoted text clipped - 5 lines]
> have the correct ID (i.e. objects aren't ever persisted between builds
> with different IDs)?
Frankly, I /don't/ need to do it, since I don't serialise anything. Which
makes it a bit hard to work out just what the right thing to do is. But
people who use stuff I build may need to; and I'm getting annoyed by too
many whinges from the compiler complaining that I haven't done it.
> If it's the latter case, then life is much simpler. You never care
> _what_ the ID is, just that it's not shared with an old and
> incompatible version. If the ID changes and the object hasn't, then
> that's OK. Just embed the Subversion (or CVS etc.)
> $LastChangedRevision: $ marker in a suitable constant.
OK, but the value of a revision in CVS is of the form $Revision: 1.3.2.3 $,
which isn't particularly easy to compile systematically into a long.
Still, it's worth looking at as a possibility.
> Subversion is
> smart enough to only update this when the source is changed (not just
> timestamp it on every checkin) and even though it'll be updated when
> non-significant changes to code are made that didn't affect
> serialization, that's no problem -- your system merely needs to check
> that all objects of that class are using the _same_ ID.
Yup. I ought to think seriously about moving to Subversion, but I haven't
got there yet.

Signature
simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
.::;===r==\
/ /___||___\____
//==\- ||- | /__\( MS Windows IS an operating environment.
//____\__||___|_// \|: C++ IS an object oriented programming language.
\__/ ~~~~~~~~~ \__/ Citroen 2cv6 IS a four door family saloon.