RFR: 8275013: Improve discussion of serialization method declarations in java.io.Object{Input, Output}Stream
Joe Darcy
darcy at openjdk.java.net
Sun Oct 10 20:34:21 UTC 2021
The java.io.ObjectInputStream and java.io.ObjectOuputStream classes are part of the serialization feature. These classes contain brief descriptions of some of the methods serializable classes can define to interact with the serialization mechanism, readObject, readObjectNoData, and writeObject. These descriptions are not entirely consistent with one another and at least one is arguably misleading.
This PR makes the brief discussion the same in both classes and addresses the misleading point: the throws clauses of the methods will not effect whether or not the methods are found by serialization, but throwing unchecked exceptions not declared in the standard signatures is ill-advised. (The current implementation looks up the methods by name using core reflection; the method modifiers are checked to match but the throws information is not.)
Please also review the corresponding CSR : https://bugs.openjdk.java.net/browse/JDK-8275014
-------------
Commit messages:
- 8275013: Improve discussion of serialization method declarations in java.io.Object{Input, Output}Stream
Changes: https://git.openjdk.java.net/jdk/pull/5883/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5883&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8275013
Stats: 18 lines in 2 files changed: 13 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/5883.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5883/head:pull/5883
PR: https://git.openjdk.java.net/jdk/pull/5883
More information about the core-libs-dev
mailing list