[lworld] Integrated: 8287241: Add IdentityException to report that a value object is not valid

Roger Riggs rriggs at openjdk.org
Thu Jun 16 17:22:07 UTC 2022


On Tue, 24 May 2022 18:25:18 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Add class java.lang.IdentityException, when thrown indicates that an identity object was required but a value object was supplied.
> 
> Also add methods `java.util.Objects.requireIdentity(obj)` and `Objects.requireIdentity(obj, message)` to check and throw.
> 
> Updated java.lang.ref.Reference and related tests to use new exception and method.

This pull request has now been integrated.

Changeset: 3d15c2f1
Author:    Roger Riggs <rriggs at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/3d15c2f1b54c8ce28c2aec82ac2c096c2ffb0f60
Stats:     157 lines in 4 files changed: 149 ins; 3 del; 5 mod

8287241: Add IdentityException to report that a value object is not valid

Reviewed-by: mchung

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

PR: https://git.openjdk.org/valhalla/pull/696



More information about the valhalla-dev mailing list