Sat, 22 Dec 2018 13:10:38 -0800
Added tag jdk8u202-b25 for changeset 15d8c732039b
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 }