Question

If I implement Externalizable, will I need to specify serialVersionUID in that class for version compatibility?

In other words, does Java check serialVersionUID while deserializing Externalizable objects?

Was it helpful?

Solution

Even through a class is Externalizable, one still has to add a serialVersionUID member to the class to indicate even though the interface to the class has changed, it is still compatible as far as the serialized or externalized form of the class.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4094702

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top