Closed GoogleCodeExporter closed 8 years ago
apparently this is only necessary when the base class itself implements
Serializable.
I'm confused (as I always am when it comes to serialization.)
Original comment by kevin...@gmail.com
on 21 Oct 2009 at 12:13
Quote from Javadoc (java.io.Serializable):
"However, it is strongly recommended that all serializable classes explicitly
declare
serialVersionUID values".
This means all classes that implement Serializable (by direct or inherited
implementation).
Original comment by ogregoire
on 21 Oct 2009 at 8:18
That javadoc excerpt is too vague I'm afraid. This is a subtle issue.
right now, the abstract classes we have that implement Ser. but have no svuid
are:
AbstractMapBasedMultiset
AbstractMultimap
ImmutableCollection
ImmutableMap
if any of these are only implementing it for the convenience of their
subclasses not
having to say it explicitly, we should fix that, but some are necessary, and I
guess
in those cases we just add this dang thing and this is fixed.
Original comment by kevin...@gmail.com
on 5 Nov 2009 at 1:21
All 4 Abstract*Multimap classes should have a serialVersionUID.
However, I don't think it's necessary for the Immutable* classes, since they
have a
separate serialized form.
Original comment by jared.l....@gmail.com
on 6 Nov 2009 at 7:36
that's good to hear. I think that the other Abstract*Multimap classes must
already
have it, that's why they didn't end up in my list.
Original comment by kevin...@gmail.com
on 6 Nov 2009 at 8:13
The other Abstract*Multimap classes don't say "implements Serializable" since
their
superclass does. That's probably why you omitted them.
Original comment by jared.l....@gmail.com
on 6 Nov 2009 at 9:11
Original comment by kevin...@gmail.com
on 9 Nov 2009 at 6:35
All the classes the need a serialVersionUID now have one. I just fixed
Abstract*Multimap and AbstractMapBasedMultiset.
Original comment by jared.l....@gmail.com
on 9 Nov 2009 at 11:30
Original issue reported on code.google.com by
kevin...@gmail.com
on 16 Oct 2009 at 11:47