On Wed, 2 Sep 2026 06:55:01 GMT, Alan Bateman <[email protected]> wrote:

>> src/hotspot/share/prims/jvmti.xml line 3417:
>> 
>>> 3415:         Value classes<sup>PREVIEW</sup></externallink> rely upon 
>>> strict field
>>> 3416:         initialization. This function can not be used to return from 
>>> a constructor
>>> 3417:         of a value class with one or more instance fields.
>> 
>> Q: Why the API Note is saying about constructors only but nothing about 
>> class initializers?
>
> There isn't any user facing feature at this time that relies on strict static 
> fields so there isn't anything to say in this API note about class 
> initializers. So at this time, the API note can just say that value classes 
> rely on strict instance fields. Once strict fields are a permanent feature 
> then we could potentially expand this API note to include record classes too.

Got it, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32198#discussion_r3911746173

Reply via email to