RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v10]
Vicente Romero
vromero at openjdk.org
Sat May 10 16:05:59 UTC 2025
On Sat, 10 May 2025 15:31:45 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> 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:
>
> integrating code from Archie
> > Thanks. Looks good, but the Lint to all option names streaming can be replaced by the static map lookup/iteration.
>
> Good point... I prototyped that in commit [be160a3](https://github.com/openjdk/jdk/commit/be160a3261bebcbd09c350a3feda6e696f26a3e3).
thanks! I will integrate it
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24746#issuecomment-2868993387
More information about the core-libs-dev
mailing list