On Thu, 18 Jun 2026 13:00:20 GMT, Jorn Vernee <[email protected]> wrote:

>> Chen Liang has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains seven additional 
>> commits since the last revision:
>> 
>>  - Review remarks
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> fix/lw-strict-static-vh
>>  - Fix missing trusted final field query
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> fix/lw-strict-static-vh
>>  - Restrict write access for IMPL_LOOKUP VH on strict final
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> fix/lw-strict-static-vh
>>  - Missing strict static validation for VarHandle
>
> src/java.base/share/classes/java/lang/invoke/VarHandles.java line 163:
> 
>> 161:         }
>> 162:         else if (type == boolean.class) {
>> 163:             return maybeAdapt(f.isFinal() && 
>> !isWriteAllowedOnFinalFields
> 
> Shouldn't we keep the `maybeAdapt` here? It's used for testing indirect var 
> handles.

It destroys the StaticFieldVarHandle type. I think keeping that type through so 
LazyInitializingVarHandle can use attributes from StaticFieldVarHandle is more 
valuable.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2550#discussion_r3436775099

Reply via email to