[lworld] setAccessible change and VarHandle test update

Paul Sandoz paul.sandoz at oracle.com
Thu Mar 8 22:55:27 UTC 2018

> On Mar 8, 2018, at 2:46 PM, Karen Kinnear <karen.kinnear at oracle.com> wrote:
> Should unsafe also not be allowed to write to them - so final is final?

I don’t think it's necessary to get 80% or more of the benefit (same applies to final fields of records/data classes), but it would be nice to get there at some point. We could support the finality of fields on value classes like we do for final fields on classes in j.l.invoke.


>>>> Value class is new and this is a good opportunity to enforce
>>>> final is final on value classes.  So setAccessible is not
>>>> supported on static final and instance fields on value types.
>>> Which also means the VM can treat these fields as final too. Is that being tracked somewhere?
>> Not sure.  I will talk with David and find out.
>> Mandy

More information about the valhalla-dev mailing list