-
Bug
-
Resolution: Duplicate
-
P3
-
7
-
generic
-
generic
The asCollector transform does not respect the type argument.
When it collects a series of arguments, it always puts it into an Object[] array.
This causes a CCE if the ultimate target requires a more specific type, such as String[].
Here is a customer report:
http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-February/002439.html
Also, this reproduces the bug:
MethodHandle asList = lookup().
findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
asList = asList.asType(methodType(List.class, String[].class)).
asVarargsCollector(String[].class);
System.out.println(asList.invokeWithArguments("a", "b", "c"));
When it collects a series of arguments, it always puts it into an Object[] array.
This causes a CCE if the ultimate target requires a more specific type, such as String[].
Here is a customer report:
http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-February/002439.html
Also, this reproduces the bug:
MethodHandle asList = lookup().
findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
asList = asList.asType(methodType(List.class, String[].class)).
asVarargsCollector(String[].class);
System.out.println(asList.invokeWithArguments("a", "b", "c"));
- duplicates
-
JDK-6939861 JVM should handle more conversion operations
- Closed
- relates to
-
JDK-6983728 JSR 292 code for limited argument counts is unused and should be deleted
- Resolved