-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b115
-
Verified
The {@code target} and {@code cleanup} must have the same corresponding argument and return types, except that {@code cleanup} may omit trailing arguments.
BUT
1. IllegalArgumentException: bad spread array length
WHEN
private static void target(int a1, long a2, Object a3, int b1, long b2, Object b3) {}
private static void cleanup(Throwable t) {}
2. WrongMethodTypeException: cannot convert MethodHandle(Throwable,int,long,Object[])void to (Throwable,Object[])void
WHEN
private static void target(int a1, long a2, Object a3, int b1, long b2, Object b3) {}
private static void cleanup(Throwable t, int a1, long a2, Object a3, int b1) {}
BUT
1. IllegalArgumentException: bad spread array length
WHEN
private static void target(int a1, long a2, Object a3, int b1, long b2, Object b3) {}
private static void cleanup(Throwable t) {}
2. WrongMethodTypeException: cannot convert MethodHandle(Throwable,int,long,Object[])void to (Throwable,Object[])void
WHEN
private static void target(int a1, long a2, Object a3, int b1, long b2, Object b3) {}
private static void cleanup(Throwable t, int a1, long a2, Object a3, int b1) {}
- is blocked by
-
JDK-8150829 Enhanced drop-args, identity and default constant, varargs adjustment
-
- Resolved
-
- relates to
-
JDK-8130227 JEP 274: Enhanced Method Handles
-
- Closed
-