Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8019340
4 * @summary varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
5 *
6 * @compile/fail/ref=VarargsWarn.out -XDrawDiagnostics -Werror VarargsWarn.java
7 */
9 import java.lang.invoke.*;
11 class VarargsWarn {
12 void test(MethodHandle mh) throws Throwable {
13 mh.invokeExact((Integer[])null);
14 mh.invoke((Integer[])null);
15 mh.invokeWithArguments((Integer[])null); //not a sig poly method - warning here!
16 }
17 }