RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v8]

Vicente Romero vromero at openjdk.org
Fri May 9 17:56:38 UTC 2025


> This PR is defining a new internal annotation, `@jdk.internal.RequiresIdentity`, with target types PARAMETER and TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation that an argument to a given method or constructor parameter will be an object with a unique identity, not an instance of a value-based class; or that the type argument to a given type parameter will not be a value-based class type.
> 
> For more details please refer to the complete description in the corresponding JIRA entry [1]
> 
> TIA
> 
> [1] https://bugs.openjdk.org/browse/JDK-8354556

Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:

  additional documentation changes and bug fixes

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24746/files
  - new: https://git.openjdk.org/jdk/pull/24746/files/d52ec33b..1ff2f2c6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24746&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24746&range=06-07

  Stats: 79 lines in 7 files changed: 41 ins; 7 del; 31 mod
  Patch: https://git.openjdk.org/jdk/pull/24746.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24746/head:pull/24746

PR: https://git.openjdk.org/jdk/pull/24746


More information about the compiler-dev mailing list