8158571: Additional method handle validation

Reviewed-by: jrose, ahgross, mchung
This commit is contained in:
Michael Haupt 2016-06-08 21:45:34 +01:00
parent 95535658a6
commit c777916f51

View file

@ -3796,7 +3796,7 @@ System.out.println((int) f0.invokeExact("x", "y")); // 2
int filterValues = filterType.parameterCount();
if (filterValues == 0
? (rtype != void.class)
: (rtype != filterType.parameterType(0)))
: (rtype != filterType.parameterType(0) || filterValues != 1))
throw newIllegalArgumentException("target and filter types do not match", targetType, filterType);
}