Integrated: 8276665: ObjectInputStream.GetField.get(name, object) should throw ClassNotFoundException

Roger Riggs rriggs at openjdk.java.net
Wed Nov 24 15:18:12 UTC 2021


On Mon, 15 Nov 2021 17:28:30 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.

This pull request has now been integrated.

Changeset: 0384739a
Author:    Roger Riggs <rriggs at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/0384739afc2d470ab6a3525e9d85aca0af58f2ed
Stats:     210 lines in 2 files changed: 206 ins; 0 del; 4 mod

8276665: ObjectInputStream.GetField.get(name, object) should throw ClassNotFoundException

Reviewed-by: naoto, lancea, smarks

-------------

PR: https://git.openjdk.java.net/jdk/pull/6393


More information about the core-libs-dev mailing list