提交 dcf800f0 编写于 作者: M mhaupt

8158571: Additional method handle validation

Reviewed-by: jrose, ahgross, mchung
上级 dff18390
...@@ -2847,7 +2847,7 @@ System.out.println((int) f0.invokeExact("x", "y")); // 2 ...@@ -2847,7 +2847,7 @@ System.out.println((int) f0.invokeExact("x", "y")); // 2
int filterValues = filterType.parameterCount(); int filterValues = filterType.parameterCount();
if (filterValues == 0 if (filterValues == 0
? (rtype != void.class) ? (rtype != void.class)
: (rtype != filterType.parameterType(0))) : (rtype != filterType.parameterType(0) || filterValues != 1))
throw newIllegalArgumentException("target and filter types do not match", targetType, filterType); throw newIllegalArgumentException("target and filter types do not match", targetType, filterType);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册