On Wed, 31 May 2023 00:27:24 GMT, Chen Liang <li...@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