RFR: 8280377: MethodHandleProxies does not correctly invoke default methods with varags [v2]

Alan Bateman alanb at openjdk.java.net
Tue Jan 25 14:41:37 UTC 2022


On Mon, 24 Jan 2022 23:13:24 GMT, Mandy Chung <mchung at openjdk.org> wrote:

> To invoke the default method, the caller will need access to the declaring interface of the default method (via bytecode invocation or reflection). The bug I had was because java.base (the module of the invocation handler) does not have access to the interface even though the caller has.

So invokeDefault is moved to Proxy with an optional access check, and you've made it callable from MHProxies by way of JLRA. I think that is okay.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7185


More information about the core-libs-dev mailing list