src/java.base/share/classes/java/lang/invoke/MethodHandles.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Cdiff src/java.base/share/classes/java/lang/invoke/MethodHandles.java

src/java.base/share/classes/java/lang/invoke/MethodHandles.java

Print this page
rev 11011 : 8066746: MHs.explicitCastArguments does incorrect type checks for VarargsCollector
Reviewed-by: ?

*** 2026,2036 **** explicitCastArgumentsChecks(target, newType); // use the asTypeCache when possible: MethodType oldType = target.type(); if (oldType == newType) return target; if (oldType.explicitCastEquivalentToAsType(newType)) { ! return target.asType(newType); } return MethodHandleImpl.makePairwiseConvert(target, newType, false); } private static void explicitCastArgumentsChecks(MethodHandle target, MethodType newType) { --- 2026,2036 ---- explicitCastArgumentsChecks(target, newType); // use the asTypeCache when possible: MethodType oldType = target.type(); if (oldType == newType) return target; if (oldType.explicitCastEquivalentToAsType(newType)) { ! return target.asFixedArity().asType(newType); } return MethodHandleImpl.makePairwiseConvert(target, newType, false); } private static void explicitCastArgumentsChecks(MethodHandle target, MethodType newType) {
src/java.base/share/classes/java/lang/invoke/MethodHandles.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File