Description
Certain warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact.
Here is an example:
.../jdk/test/java/lang/invoke/BigArityTest.java:295: warning: non-varargs call of varargs method with inexact argument type for last parameter;
r = mh_VA.invokeExact((Integer[])args);
^
cast to Object for a varargs call
cast to Object[] for a non-varargs call and to suppress this warning
The type Integer[] is defined to be literally present in the bytecode call site descriptor. The suggested changes (cast to Object or cast to Object[]) would presumably be erroneous, since they would change the call site descriptor to one which is incompatible with the specified one.
Here is an example:
.../jdk/test/java/lang/invoke/BigArityTest.java:295: warning: non-varargs call of varargs method with inexact argument type for last parameter;
r = mh_VA.invokeExact((Integer[])args);
^
cast to Object for a varargs call
cast to Object[] for a non-varargs call and to suppress this warning
The type Integer[] is defined to be literally present in the bytecode call site descriptor. The suggested changes (cast to Object or cast to Object[]) would presumably be erroneous, since they would change the call site descriptor to one which is incompatible with the specified one.