RFR: 8276665: ObjectInputStream.GetField.get(name, object) should throw ClassNotFoundException
Roger Riggs
rriggs at openjdk.java.net
Wed Nov 17 15:51:51 UTC 2021
The ObjectInputStream.GetField.get(String name, Object val) method is returning null instead of throwing an exception when the class of the object is not found. The caller is not able to correctly handle the case where the class is not found. The signature of GetField.get(name, val) should have a throws ClassNotFoundException and a ClassNotFoundException exception should be thrown.
-------------
Commit messages:
- 8276665: ObjectInputStream.GetField.get should throw ClassNotFoundException
Changes: https://git.openjdk.java.net/jdk/pull/6393/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6393&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8276665
Stats: 211 lines in 2 files changed: 207 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/6393.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6393/head:pull/6393
PR: https://git.openjdk.java.net/jdk/pull/6393
More information about the core-libs-dev
mailing list