RFR: 8276665: ObjectInputStream.GetField.get(name, object) should throw ClassNotFoundException [v2]
Naoto Sato
naoto at openjdk.java.net
Thu Nov 18 22:51:38 UTC 2021
On Thu, 18 Nov 2021 15:33:26 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> 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.
>
> Roger Riggs has updated the pull request incrementally with three additional commits since the last revision:
>
> - Merge branch '8276665-readfields-cnfe' of https://github.com/RogerRiggs/jdk into 8276665-readfields-cnfe
> - Correct javadoc link syntax
> - 8276665: ObjectInputStream.GetField.get should throw ClassNotFoundException
> Updated to add throws CNFE to GetField.get and test for various cases.
Marked as reviewed by naoto (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/6393
More information about the core-libs-dev
mailing list