My serializable class is not getting read in with objectinputstream after adding static methods to the class, is this expected behavior? Where in the javadoc does it state adding static methods to a serializable class creates incompatibility?
My serializable class is not getting read in with objectinputstream after adding static methods
Share
In the Java Object Serialization Specification, section 4.6:
No, I can’t work out how it could actually break compatibility of serialized state either, but this is why it’s either worth avoiding the default Java binary serialization (e.g. for Protocol Buffers) or always declaring a
serialVersionUidyourself.