Hello,
I would expect a WrongMethodTypeException to be thrown by
convertArguments in the following snippet, on the ground that String
is neither a wrapper nor a supertype of a wrapper of int, the return
type of mh0.
MethodHandle mh0 = lookup.findVirtual(String.class, "length",
MethodType.methodType(int.class));
MethodHandle mh1 = MethodHandles.convertArguments(mh0,
MethodType.methodType(String.class, String.class));
However, build 142 of the JDK 7 (2011-05-12) executes the code without
errors. Is this expected behavior?
Regards
Raffaello
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev