RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v25]

Chen Liang liach at openjdk.org
Tue Jul 18 01:57:58 UTC 2023


On Mon, 17 Jul 2023 17:29:09 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java line 165:
>> 
>>> 163:                 () -> "incorrect dynamic module name: " + implModule.getName());
>>> 164: 
>>> 165:         assertSame(implClass.getClassLoader(), implModule.getClassLoader(),
>> 
>> I think this should check against `ifaceModule.getClassLoader()` instead, right? Since the dynamic module is defined in the interface' class loader.
>
> Good catch!   Yes, this should check against the interface's loader.

I've added a new check for `ifaceClass.getClassLoader()`, should be functionally equivalent. This check is originally part of `ProxyForMethodHandle` test, so I decided to keep it as well as it tests impl module's behavior.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1266091042


More information about the core-libs-dev mailing list