On Tue, 16 Jun 2026 06:30:10 GMT, Jaikiran Pai <[email protected]> wrote:

>> It's okay to use this API in the implementation of method in java.base (or 
>> other "participates in preview" modules). It's no different to when virtual 
>> threads were in preview and we have checked for isVirtual in several places 
>> of the implementation.
>
> Hello Alan, my comment was more in terms of readability to make it clear at 
> this call site that the identity requirement is only applicable when preview 
> features is enabled. I don't have a strong preference and it's OK to retain 
> it in the current form.

On the contrary, I would argue for making requireIdentity a reflective preview 
API - this requirement makes sense for programs running out of preview too, 
that they want something with a monitor instead of null or new kinds of 
monitorless objects.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31123#discussion_r3418608621

Reply via email to