langtools/test/tools/javac/T6554097.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 8225 e9e5670e6a71
child 37634 a5f740ef93f2
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg
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