author | hannesw |
Tue, 22 Mar 2016 14:23:16 +0100 | |
changeset 36690 | 06b714373aa4 |
parent 18917 | 33c954cf3825 |
permissions | -rw-r--r-- |
18917
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
1 |
/* |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 8019340 |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
4 |
* @summary varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
5 |
* |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
6 |
* @compile/fail/ref=VarargsWarn.out -XDrawDiagnostics -Werror VarargsWarn.java |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
7 |
*/ |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
8 |
|
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
9 |
import java.lang.invoke.*; |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
10 |
|
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
11 |
class VarargsWarn { |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
12 |
void test(MethodHandle mh) throws Throwable { |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
13 |
mh.invokeExact((Integer[])null); |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
14 |
mh.invoke((Integer[])null); |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
15 |
mh.invokeWithArguments((Integer[])null); //not a sig poly method - warning here! |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
16 |
} |
33c954cf3825
8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
mcimadamore
parents:
diff
changeset
|
17 |
} |