RMIC enforces obsolete restriction on serialized fields
russgold opened this issue · comments
As noted in section 1.5 of the serialization spec https://docs.oracle.com/javase/7/docs/platform/serialization/spec/serial-arch.html#6250:
"By using serialPersistentFields to define the Serializable fields for a class, there no longer is a limitation that a serializable field must be a field within the current definition of the Serializable class. The writeObject and readObject methods of the Serializable class can map the current implementation of the class to the serializable fields of the class using the interface that is described in Section 1.7, "Accessing Serializable Fields of a Class." Therefore, the fields for a Serializable class can change in a later release, as long as it maintains the mapping back to its Serializable fields that must remain compatible across release boundaries."
But the code is checking that all values in serialPersistentFields are fields in the class, which is incorrect.
Closed by #56