Reputation: 625
Please provide scenarios/conditions those fail during deserialization when a class & serialized object have same serialVersionUID
?
I'm looking scenarios like following
1) If a data type of an instance variable is changed then deserialization will fail
Could you please provide all such scenarios. I couldn't find such scenarios list anywhere in the internet.
Thanks
Upvotes: 2
Views: 566
Reputation: 68962
The Exceptions thrown from readObject() give a first impression of what could happen.
http://java.sun.com/j2se/1.4.2/docs/api/java/io/ObjectInputStream.html#readObject()
Upvotes: 1
Reputation: 718826
The changes that will make deserialization fail are listed in the Java Object Serialization Specification, Section 5.6.1.
Upvotes: 4