-
Bug
-
Resolution: Fixed
-
P3
-
hs20, 7
-
b12
-
generic, sparc
-
generic, solaris
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2209829 | 7 | Tom Rodriguez | P3 | Closed | Fixed | b142 |
public class T {
static void assertEquals(Object exp, Object act) {
System.out.println(exp + " vs " + act);
}
static MethodHandle asList;
static void test() {
MethodHandle makeEmptyList = MethodHandles.constant(List.class, Arrays.asList());
MethodHandle asList = lookup().findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
T.asList = asList;
MethodHandle collectingTypeHandler = lookup()
.findStatic(lookup().lookupClass(), "collectingTypeHandler",
methodType(MethodHandle.class, MethodHandle.class, MethodType.class));
MethodHandle makeAnyList = makeEmptyList.withTypeHandler(collectingTypeHandler);
assertEquals("TEST>[two, too]<TEST", makeAnyList.invokeGeneric("two", "too").toString());
}
static MethodHandle collectingTypeHandler(MethodHandle base, MethodType newType) {
return asList.asCollector(Object[].class, newType.parameterCount()).asType(newType);
}
}
With -Xcomp, it prints:
(String,String)Object vs [two, too]
With -Xint it prints:
TEST>[two, too]<TEST vs [two, too]
- backported by
-
JDK-2209829 JSR 292 Invalid value on stack on solaris-sparc with -Xcomp
- Closed
- duplicates
-
JDK-6990587 JRuby test/test_rexml_document.rb fails with NPE on SPARC
- Closed
-
JDK-7035501 JSR 292: java/lang/invoke/JavaDocExamplesTest.java failed
- Closed
- relates to
-
JDK-7043301 assert(locals < caller->fp() || locals > (caller->fp() + 16)) failed: locals in save area
- Closed
-
JDK-7043461 VM crashes in void LinkResolver::runtime_resolve_virtual_method
- Closed
-
JDK-7009346 java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp
- Closed
-
JDK-8055523 inconsistent args passed to AbstractInterpreter::layout_activation
- Open