Updated JEP: nestmates
John Rose
john.r.rose at oracle.com
Fri Apr 14 20:18:31 UTC 2017
On Apr 13, 2017, at 2:51 PM, David Holmes <david.holmes at oracle.com> wrote:
>
> On 14/04/2017 3:09 AM, John Rose wrote:
>> On Apr 13, 2017, at 4:36 AM, David Holmes <david.holmes at oracle.com> wrote:
>>
>>>> you can not modify nest definition attributes at runtime using java.lang.instrument.
>>>
>>> Yes.
>>
>> I'm missing something here. Why must nestmate attributes be specifically hardened against instrumentation changes? Can't instrumentation, in general, change any aspect of a classfile?
>
> Instrumentation is primarily about adding bytecodes to methods. There are strict constraints on what instrumentation can change with respect to the "shape" of a type (members, inheritance hierarchy).
>
> "The retransformation may change method bodies, the constant pool and attributes. The retransformation must not add, remove or rename fields or methods, change the signatures of methods, change modifiers, or change inheritance.". [ JVM TI spec.]
>
> Similarly for redefinition, which also adds " or change inheritance".
>
> So no changes to super-types. And now no changes to nest membership.
Thanks; that what I was missing.
More information about the valhalla-dev
mailing list