RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v16]
Mandy Chung
mchung at openjdk.org
Fri May 26 22:08:18 UTC 2023
On Fri, 26 May 2023 22:03:40 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> If we keep a cache of all MHProxy classes, I think this would not need `sun.invoke.WrapperInstance`. OTOH, `sun.invoke` does not have any other class except `WrapperInstance` and the `ensureOriginalLookup` method would need to be in an internal class. So no problem of implementing `sun.invoke.WrapperInstance`.
>
>> because a conditionally-exported package is considered a non-(unconditionally-)exported package.
>
> OK. I need to look into the right solution for this. The Proxy implementation uses null protection domain to define the proxy class whereas this patch uses the protection domain as the interface to define the MHProxy class. That's why this issue only occurs in this new implementation.
If we can avoid implementing `sun.invoke.WrapperInstance`, this package access check issue would go away. Do you think you can look into it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1207416972
More information about the core-libs-dev
mailing list