New candidate JEP: 371: Hidden Classes

David Lloyd david.lloyd at redhat.com
Mon Jan 27 13:56:57 UTC 2020


On Fri, Jan 24, 2020 at 4:56 PM David Holmes <david.holmes at oracle.com> wrote:
>
> FYI.

I'm a bit curious about this:

> To invoke private nestmate instance methods from code in the hidden class, use invokevirtual or invokeinterface instead of invokespecial. Generated bytecode that uses invokespecial to invoke a private nestmate instance method will fail verification. invokespecial should only be used to invoke private nestmate constructors.

This seems pretty unusual.  Don't we normally use invokespecial for
private method invocations?  What is the reasoning for this?

-- 
- DML



More information about the core-libs-dev mailing list