On Mon, 27 Apr 2026 09:16:56 GMT, Viktor Klang <[email protected]> wrote:

>> src/java.base/share/classes/java/lang/LazyConstant.java line 159:
>> 
>>> 157:  * the initialized constant's content is read. Hence, the initialized 
>>> constant's content,
>>> 158:  * including any {@code final} fields of any newly created objects, is 
>>> safely published.
>>> 159:  * As reading of the content might be elided, there are no other 
>>> memory ordering or
>> 
>> I find this sentence a bit odd -- you say in the para above that the content 
>> of the LC are safely published -- which implies there is at least some 
>> memory ordering between initialization and a get that sees the initialized 
>> value (or an error state). It seems to me this new para applies more to 
>> subsequent reads?
>
> I wonder if this sentence is necessary in general—perhaps we could just drop 
> it?

I've made some updates here. Let me know what you think.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3153652810

Reply via email to