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

Johannes Kuhn jkuhn at openjdk.org
Fri Mar 1 15:24:56 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

I did not read through the entire patch - @mlchung did comment on the bug report back then:

> Alternative fix for backport consideration:
> 
>     @@ -343,7 +343,7 @@ public class MethodHandleProxies {
>                              intfc, mk.getName(),
>                              MethodType.methodType(mk.getReturnType(), mk.getParameterTypes()),
>                              self.getClass());
>     - return mh.asSpreader(Object[].class, mk.getParameterCount());
>     + return mh.asFixedArity().asSpreader(Object[].class, mk.getParameterCount()); 

https://bugs.openjdk.org/browse/JDK-8280377?focusedId=14471119&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14471119

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2235#issuecomment-1973379395


More information about the jdk-updates-dev mailing list