On Wed, 17 Jun 2026 14:06:59 GMT, Chen Liang <[email protected]> wrote:
>> I have to admit that when I initially saw the parameter to makeFieldHandle >> named "trusted" that I assumed it meant a trusted-final when it actually >> means produced from IMPL_LOOKUP. > >> This seems like an unintended change. > > I intentionally made that change to secure against modifying strict or > trusted finals even with IMPL_LOOKUP. I will roll it back if you think it's > too strict. It's not too strict, but it seems like you've not implemented it correctly. It should be: boolean noWriting = f.isFinal() && (!trusted || f.isStrictInit() || f.isTrustedFinalField()); Otherwise trusted finals are writable. Note that `IMPL_LOOKUP` currently _does not_ allow writing to trusted finals already. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2550#discussion_r3428850456
