RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v16]
David Holmes
david.holmes at oracle.com
Mon Nov 15 12:13:24 UTC 2021
On 15/11/2021 8:14 pm, Alan Bateman wrote:
> On 15/11/2021 09:48, David Holmes wrote:
>> I think there may be a misunderstanding here, AFAICS they are using
>> reflection to remove the final-ness of a field in their own classes,
>> not modifying anything in Class or Field.
>
> That's the outcome. To get there, they call a private method
> getDeclaredFields0 on j.l.Class and also change the value of the private
> "modifiers" field in jlr.Field. It's just not tenable to hack into
> private members like this. Martin seems to have done the right thing and
> removed it.
Apologies - the misunderstanding was mine.
David
> -Alan.
More information about the core-libs-dev
mailing list