1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/warnings/suppress/T6480588.java Mon Sep 16 14:13:44 2013 +0200 1.3 @@ -0,0 +1,36 @@ 1.4 +/** 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 6470588 1.7 + * @summary Verify that \\@SuppressWarnings("deprecation") works OK for all parts 1.8 + * of class/method/field "header", including (declaration) annotations 1.9 + * @build VerifySuppressWarnings 1.10 + * @compile/ref=T6480588.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T6480588.java 1.11 + * @run main VerifySuppressWarnings T6480588.java 1.12 + */ 1.13 + 1.14 +@DeprecatedAnnotation 1.15 +class T6480588 extends DeprecatedClass implements DeprecatedInterface { 1.16 + @DeprecatedAnnotation 1.17 + public DeprecatedClass method(DeprecatedClass param) throws DeprecatedClass { 1.18 + DeprecatedClass lv = new DeprecatedClass(); 1.19 + @Deprecated 1.20 + DeprecatedClass lvd = new DeprecatedClass(); 1.21 + return null; 1.22 + } 1.23 + 1.24 + @Deprecated 1.25 + public void methodD() { 1.26 + } 1.27 + 1.28 + @DeprecatedAnnotation 1.29 + DeprecatedClass field = new DeprecatedClass(); 1.30 + 1.31 + @DeprecatedAnnotation 1.32 + class Inner extends DeprecatedClass implements DeprecatedInterface { 1.33 + } 1.34 + 1.35 +} 1.36 + 1.37 +@Deprecated class DeprecatedClass extends Throwable { } 1.38 +@Deprecated interface DeprecatedInterface { } 1.39 +@Deprecated @interface DeprecatedAnnotation { }