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
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
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