RFR: 8280377: MethodHandleProxies does not correctly invoke default methods with varags [v4]
Mandy Chung
mchung at openjdk.java.net
Wed Jan 26 01:12:35 UTC 2022
On Wed, 26 Jan 2022 00:06:25 GMT, liach <duke at openjdk.java.net> wrote:
> They will probably accept a MethodHandles.Lookup object to define a class for such a single-interface instance plus calling the default methods beyond the restrictions.
Yes, that's one option. Such library should take a Lookup parameter to find the method handle for the default method as in the previous `MethodHandleProxies` implementation. Alternatively, the module of the target interface will need to be open to the library's module for deep reflection and the library can use `MethodHandles::privateLookupIn` to lookup the default method then.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7185
More information about the core-libs-dev
mailing list