mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8158571: Additional method handle validation
Reviewed-by: jrose, ahgross, mchung
This commit is contained in:
parent
95535658a6
commit
c777916f51
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue