-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b116
-
unknown
-
generic
-
Verified
The following example:
import java.dyn.*;
class Test {
void test(MethodHandle mh) throws Throwable {
String s = mh.<String>invokeExact("daddy",'d','n'); //this works but gets warning to use new syntax
s = (String)mh.invokeExact("bunny",'n','d'); //this throws exception
}
}
produces a classfile that uses two separate constant pool method entries for encoding the signatures of the PS methods.
import java.dyn.*;
class Test {
void test(MethodHandle mh) throws Throwable {
String s = mh.<String>invokeExact("daddy",'d','n'); //this works but gets warning to use new syntax
s = (String)mh.invokeExact("bunny",'n','d'); //this throws exception
}
}
produces a classfile that uses two separate constant pool method entries for encoding the signatures of the PS methods.
- relates to
-
JDK-6979327 method handle invocation should use casts instead of type parameters to specify return type
- Closed