Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments() would

2018-06-08 Thread Rony G. Flatscher
On 11.03.2018 20:22, Rony G. Flatscher wrote: > Well, still trying to find out what the reason is, that core reflection's > invoke behaves > differently to MethodHandle's invokeWithArguments in one single case so far > (using the method > java.utli.Arrays.asList(...)). > > Here is a little Java p

Re: mlvm-dev Digest, Vol 117, Issue 1

2018-06-08 Thread Jesper Steen Møller
Hi Rony I can't see anything wrong with the behaviour of invokeWithArguments here, but the Method.invoke is odd. Considering that: Arrays.asList(arrNames); works as intended, it's quite reasonable that mh.invokeWithArguments(arrNames); behaves the same. So if anything, it's M

Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments() would

2018-06-08 Thread Peter Levart
Hi Rony, I think what you found is a discrepancy between handling of varargs methods using reflection vs. method handle's .invokeWithArguments(). Reflection basically ignores the fact that some methods are varargs methods. It treats them exactly the same as if they had an array parameter (no