author | alundblad |
Mon, 18 Apr 2016 22:25:50 +0200 | |
changeset 37634 | a5f740ef93f2 |
parent 8225 | e9e5670e6a71 |
permissions | -rw-r--r-- |
8225 | 1 |
/* |
2 |
* @test /nodynamiccopyright/ |
|
3 |
* @bug 6554097 |
|
4 |
* @summary "final" confuses at-SuppressWarnings |
|
5 |
* @compile T6554097.java |
|
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
6 |
* @compile/fail/ref=T6554097.out -XDrawDiagnostics -Werror -Xlint:rawtypes T6554097.java |
8225 | 7 |
*/ |
8 |
||
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
9 |
import java.util.ArrayList; |
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
10 |
|
8225 | 11 |
class T6554097 { |
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
12 |
|
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
13 |
@SuppressWarnings("unchecked") final ArrayList[] v1 = { new ArrayList() {} }; |
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
14 |
@SuppressWarnings("unchecked") ArrayList[] v2 = { new ArrayList() {} }; |
8225 | 15 |
|
16 |
public static void m1() throws Throwable { |
|
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
17 |
@SuppressWarnings("unchecked") final ArrayList[] v3 = { new ArrayList() {} }; |
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
18 |
@SuppressWarnings("unchecked") ArrayList[] v4 = { new ArrayList() {} }; |
8225 | 19 |
} |
20 |
||
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
21 |
final ArrayList[] v5 = { new ArrayList() {} }; |
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
22 |
ArrayList[] v6 = { new ArrayList() {} }; |
8225 | 23 |
|
24 |
public static void m2() throws Throwable { |
|
37634
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
25 |
final ArrayList[] v7 = { new ArrayList() {} }; |
a5f740ef93f2
7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
alundblad
parents:
8225
diff
changeset
|
26 |
ArrayList[] v8 = { new ArrayList() {} }; |
8225 | 27 |
} |
28 |
} |
|
29 |