On Wed, 17 Jun 2026 14:14:16 GMT, Jorn Vernee <[email protected]> wrote:
>>> 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 (thanks to the `!getField.isTrustedFinalField()` here). I have fixed the missing isTrustedFinalField call in the latest update and added cases for those. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2550#discussion_r3429415070
