8177276: MethodHandles.insertArguments doesn't specify IllegalArgumentException on index mismatch

Correct MethodHandles.insertArguments spec

Reviewed-by: psandoz, mchung, ntv
This commit is contained in:
Vivek Theeyarath 2018-05-25 22:56:00 -07:00
parent 41259aae4d
commit 5103e3b4a3
2 changed files with 46 additions and 0 deletions

View file

@ -3483,6 +3483,11 @@ assert((int)twice.invokeExact(21) == 42);
* @return a method handle which inserts an additional argument,
* before calling the original method handle
* @throws NullPointerException if the target or the {@code values} array is null
* @throws IllegalArgumentException if (@code pos) is less than {@code 0} or greater than
* {@code N - L} where {@code N} is the arity of the target method handle and {@code L}
* is the length of the values array.
* @throws ClassCastException if an argument does not match the corresponding bound parameter
* type.
* @see MethodHandle#bindTo
*/
public static