-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
17
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Currently the serialization specification (and possibly also the Javadoc of java.io.Serializable) seems to be incomplete regarding how `writeReplace` and `readResolve` methods are looked up, see:
- https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/output.html#the-writereplace-method
- https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/input.html#the-readresolve-method
In particular it is not mentioned that:
- inherited methods are considered (and maybe that packages are not considered the same if loaded by separate class loaders (JDK-4765255))
- `default` methods of interfaces are not considered
Some of this is also mentioned inJDK-8274335, but it looks like the intention of that issue was not to update any specification.
Currently the serialization specification (and possibly also the Javadoc of java.io.Serializable) seems to be incomplete regarding how `writeReplace` and `readResolve` methods are looked up, see:
- https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/output.html#the-writereplace-method
- https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/input.html#the-readresolve-method
In particular it is not mentioned that:
- inherited methods are considered (and maybe that packages are not considered the same if loaded by separate class loaders (
- `default` methods of interfaces are not considered
Some of this is also mentioned in
- relates to
-
JDK-4765255 ObjectStreamClass.packageEquals() not always correct
-
- Resolved
-