1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/T6554097.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,26 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 6554097 1.7 + * @summary "final" confuses at-SuppressWarnings 1.8 + * @compile T6554097.java 1.9 + * @compile/fail/ref=T6554097.out -XDrawDiagnostics -Werror -Xlint:serial T6554097.java 1.10 + */ 1.11 + 1.12 +class T6554097 { 1.13 + @SuppressWarnings("serial") final Throwable[] v1 = { new Throwable() {} }; 1.14 + @SuppressWarnings("serial") Throwable[] v2 = { new Throwable() {} }; 1.15 + 1.16 + public static void m1() throws Throwable { 1.17 + @SuppressWarnings("serial") final Throwable[] v3 = { new Throwable() {} }; 1.18 + @SuppressWarnings("serial") Throwable[] v4 = { new Throwable() {} }; 1.19 + } 1.20 + 1.21 + final Throwable[] v5 = { new Throwable() {} }; 1.22 + Throwable[] v6 = { new Throwable() {} }; 1.23 + 1.24 + public static void m2() throws Throwable { 1.25 + final Throwable[] v7 = { new Throwable() {} }; 1.26 + Throwable[] v8 = { new Throwable() {} }; 1.27 + } 1.28 +} 1.29 +