langtools/test/tools/javac/T6554097.java
author mfang
Tue, 08 Mar 2011 23:43:09 -0800
changeset 8639 342d286db293
parent 8225 e9e5670e6a71
child 37634 a5f740ef93f2
permissions -rw-r--r--
7025324: NLS: t13y fix for 7022005 [ja,zh_CN] javadoc, part of navigation bar in generated html are not translated Reviewed-by: yhuang, ogino, jennyh
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8225
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     1
/*
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     3
 * @bug     6554097
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     4
 * @summary "final" confuses at-SuppressWarnings
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     5
 * @compile T6554097.java
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     6
 * @compile/fail/ref=T6554097.out -XDrawDiagnostics -Werror -Xlint:serial T6554097.java
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     7
 */
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     8
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
     9
class T6554097 {
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    10
    @SuppressWarnings("serial") final Throwable[] v1 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    11
    @SuppressWarnings("serial")       Throwable[] v2 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    12
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    13
    public static void m1() throws Throwable {
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    14
            @SuppressWarnings("serial") final Throwable[] v3 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    15
            @SuppressWarnings("serial")       Throwable[] v4 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    16
    }
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    17
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    18
    final Throwable[] v5 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    19
          Throwable[] v6 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    20
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    21
    public static void m2() throws Throwable {
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    22
        final Throwable[] v7 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    23
                  Throwable[] v8 = { new Throwable() {} };
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    24
    }
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    25
}
e9e5670e6a71 6554097: "final" confuses @SuppressWarnings
jjg
parents:
diff changeset
    26