jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 6554097
4* @summary "final" confuses at-SuppressWarnings
5* @compile T6554097.java
6* @compile/fail/ref=T6554097.out -XDrawDiagnostics -Werror -Xlint:rawtypes T6554097.java
7*/
8
9import java.util.ArrayList;
10
11class T6554097 {
12
13@SuppressWarnings("unchecked") final ArrayList[] v1 = { new ArrayList() {} };
14@SuppressWarnings("unchecked") ArrayList[] v2 = { new ArrayList() {} };
15
16public static void m1() throws Throwable {
17@SuppressWarnings("unchecked") final ArrayList[] v3 = { new ArrayList() {} };
18@SuppressWarnings("unchecked") ArrayList[] v4 = { new ArrayList() {} };
19}
20
21final ArrayList[] v5 = { new ArrayList() {} };
22ArrayList[] v6 = { new ArrayList() {} };
23
24public static void m2() throws Throwable {
25final ArrayList[] v7 = { new ArrayList() {} };
26ArrayList[] v8 = { new ArrayList() {} };
27}
28}
29
30