[jdk17u-dev] RFR: 8280377: MethodHandleProxies does not correctly invoke default methods with varags

María Arias de Reyna duke at openjdk.org
Thu Mar 7 09:51:55 UTC 2024


On Mon, 26 Feb 2024 12:52:28 GMT, María Arias de Reyna <duke at openjdk.org> wrote:

> This is a backport of https://bugs.openjdk.org/browse/JDK-8280377 MethodHandleProxies does not correctly invoke default methods with varags
> 
> I applied the same fix that was applied to version 19 in https://github.com/openjdk/jdk/commit/a183bfb436a7dd998e602c2d16486e88c390fca1

src/java.base/share/classes/java/lang/reflect/Proxy.java line 1323:

> 1321:      *         if caller is non-null
> 1322:      */
> 1323:     static Object invokeDefault(Object proxy, Method method, Object[] args, Class<?> caller)

This is the piece of code that will now unify calling methods both from `MethodHandleProxies` (where this code is copied from) and `ReflectAccess`, which was using a different way of calling methods.

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

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/2235#discussion_r1515862906


More information about the jdk-updates-dev mailing list