[英]Please provide scenarios/conditions those fail during deserialization when a class & serialized object have same serialVersionUID?
Please provide scenarios/conditions those fail during deserialization when a class & serialized object have same serialVersionUID
? 请提供在类和序列化对象具有相同的
serialVersionUID
反序列化过程中失败的方案/条件?
I'm looking scenarios like following 我正在寻找以下情况
1) If a data type of an instance variable is changed then deserialization will fail 1)如果实例变量的数据类型更改,则反序列化将失败
Could you please provide all such scenarios. 您能提供所有这样的方案吗? I couldn't find such scenarios list anywhere in the internet.
我在互联网的任何地方都找不到这样的场景列表。
Thanks 谢谢
Java对象序列化规范第5.6.1节中列出了将使反序列化失败的更改。
The Exceptions thrown from readObject() give a first impression of what could happen. 从readObject()抛出的异常给人以第一印象。
http://java.sun.com/j2se/1.4.2/docs/api/java/io/ObjectInputStream.html#readObject() http://java.sun.com/j2se/1.4.2/docs/api/java/io/ObjectInputStream.html#readObject()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.