On Fri, 20 May 2022 02:25:32 GMT, liach <d...@openjdk.java.net> wrote:
>> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, >> the interfaces are iterated twice. The two passes can be merged into one, >> yielding the whole proxy definition context (module, package, whether >> there's package-private interface) when determining the module. >> >> Split from #8278. Helpful for moving proxies to hidden classes, but is a >> good cleanup on its own. > > liach has updated the pull request incrementally with one additional commit > since the last revision: > > Update src/java.base/share/classes/java/lang/reflect/Proxy.java line 514: > 512: // Per JLS 7.4.2, unnamed package can only exist in > unnamed modules. > 513: // This means a package-private superinterface exist in > the unnamed > 514: // package of a named module. With this patch, I think line 505-517 can turn into assert or internal error as you suggested. Probably can be moved to the `ProxyClassContext` constructor too. ------------- PR: https://git.openjdk.java.net/jdk/pull/8281