What changes can make serialized class versions incompatible?

后端 未结 1 1548
北海茫月
北海茫月 2021-01-14 09:47

I\'m experimenting with the java serialization API to create small persistent objects. In my research I have found a lot on the importance of versioning, so you can detect

相关标签:
1条回答
  • 2021-01-14 10:28

    If you define serialVersionUID, removing or adding a primitive member doesn't break it (missing primitives get their default values). More info: Java Serialization Specification.

    0 讨论(0)
提交回复
热议问题