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

Roger Riggs rriggs at openjdk.java.net
Wed May 25 20:36:52 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:

  Add Objects.requireIdentity(obj, Supplier<String> supplier);
  update copyright

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

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

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

  Stats: 24 lines in 2 files changed: 21 ins; 0 del; 3 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