Relates :
|
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.
|