Wed, 30 Oct 2013 18:09:49 +0000
8027327: jar files related to test test/tools/javac/ExtDirs/ExtDirTest.java should be removed from the repo
Reviewed-by: ksrini
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 }