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

Roger Riggs rriggs at openjdk.java.net
Wed Jun 8 21:42:05 UTC 2022


> 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.

Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:

  Tweaks to Objects.requireIdentity and IdentityException

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

Changes:
  - all: https://git.openjdk.java.net/valhalla/pull/696/files
  - new: https://git.openjdk.java.net/valhalla/pull/696/files/0785a81f..0d9a92c6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=696&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=696&range=01-02

  Stats: 8 lines in 2 files changed: 2 ins; 0 del; 6 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/696.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/696/head:pull/696

PR: https://git.openjdk.java.net/valhalla/pull/696



More information about the valhalla-dev mailing list