RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

liach duke at openjdk.java.net
Thu May 26 23:25:32 UTC 2022


On Thu, 26 May 2022 22:33:29 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> 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
>
> Ah, I see. That assert was added in PR #313 as a clarification to the current proxy implementation but not required by the `InvocationHandle::invokeDefault`.   It could have been added before the default method support.

It appears to me that it's required by `proxyClassLookup` to perform reflective access on the dynamic module or the module where the package-private interface is located.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8281


More information about the core-libs-dev mailing list