[9, 8u40] RFR (XXS): 8066746: MHs.explicitCastArguments does incorrect type checks for VarargsCollector
john.r.rose at oracle.com
Tue Dec 9 00:02:26 UTC 2014
Reviewed. — John
> On Dec 8, 2014, at 3:47 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> Recent changes (8057656 ) broke MHs.explicitCastArguments for VarargsCollector case. It introduced an equivalence check between MHs.explicitCastArguments and MethodHandle.asType() which doesn't work for VarargsCollector case as expected.
> VarargsCollector has special asType() implementation, which supports collecting any number of trailing positional arguments into an array argument. It doesn't play well with MHs.explicitCastArguments, because the latter is meant to be a pairwise argument and return type conversion.
> The fix is to ensure that adapted method handle has fixed arity.
> Testing: regression test, jck (api/java_lang/invoke), jdk/java/lang/invoke
> Best regards,
> Vladimir Ivanov
>  https://bugs.openjdk.java.net/browse/JDK-8057656
More information about the core-libs-dev