RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v16]
Mandy Chung
mchung at openjdk.org
Wed May 31 00:55:05 UTC 2023
On Wed, 31 May 2023 00:27:24 GMT, Chen Liang <liach at openjdk.org> wrote:
> Apparently, calling utility methods from sun.invoke, like the ensureOriginalLookup in this patch, also triggers this check.
It should not trigger `checkPackageAccess` if it does not implement the interface AFAICT.
It would trigger module-access check. `java.base` can export `sun.invoke` to the dynamic module (it may be worth considering putting the internal interface in a specific package for the dynamic module' use - `sun.invoke` is ok since it currently has one interface but hard to catch when someone adds a new class/interface in `sun.invoke` unintentionally and leak out sensitive API.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1210971821
More information about the core-libs-dev
mailing list