On Thu, 26 May 2022 21:32:53 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> liach has updated the pull request with a new target base due to a merge or >> a rebase. The incremental webrev excludes the unrelated changes brought in >> by the merge/rebase. The pull request contains seven additional commits >> since the last revision: >> >> - Group proxy location validation all into the class context constructor >> - Merge branch 'master' into fix/proxy-single-pass >> - Update >> - Updates suggested by mandy >> - Merge branch 'master' into fix/proxy-single-pass >> - Don't need to complexify module cache >> - 8284942: Proxy building can just iterate superinterfaces once > > src/java.base/share/classes/java/lang/reflect/Proxy.java line 513: > >> 511: >> 512: if (!module.isOpen(pkg, Proxy.class.getModule())) { >> 513: // Required for default method invocation > > Is this comment true? > > The module of the proxy class opens the package to `java.base` if the proxy > interface is non-public in a named module or if all proxy interfaces are > public but a proxy interface is not unconditionally exported. The original check and `Modules.addOpen` calls were added in [8159476](https://bugs.openjdk.java.net/browse/JDK-8159746), when the `invokeDefault` support was added. See: https://github.com/openjdk/jdk/commit/56b15fbbcc7c04252f2712d859ff7b820b7c79ad#diff-c15cc774a95bac204c294b9ca8e20332c81904e506e16bb7d5a82d1c30cced17R667, or #313 ------------- PR: https://git.openjdk.java.net/jdk/pull/8281