Re: Behavior of MethodHandles.convertArguments

2011-05-21 Thread John Rose
On May 15, 2011, at 9:40 AM, Raffaello Giulietti wrote: > 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

Behavior of MethodHandles.convertArguments

2011-05-15 Thread Raffaello Giulietti
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.