test/tools/javac/warnings/suppress/T6480588.java

changeset 2028
4ce8148ffc4f
parent 0
959103a6100f
equal deleted inserted replaced
2027:4932bb04c4b8 2028:4ce8148ffc4f
1 /**
2 * @test /nodynamiccopyright/
3 * @bug 6470588
4 * @summary Verify that \\@SuppressWarnings("deprecation") works OK for all parts
5 * of class/method/field "header", including (declaration) annotations
6 * @build VerifySuppressWarnings
7 * @compile/ref=T6480588.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T6480588.java
8 * @run main VerifySuppressWarnings T6480588.java
9 */
10
11 @DeprecatedAnnotation
12 class T6480588 extends DeprecatedClass implements DeprecatedInterface {
13 @DeprecatedAnnotation
14 public DeprecatedClass method(DeprecatedClass param) throws DeprecatedClass {
15 DeprecatedClass lv = new DeprecatedClass();
16 @Deprecated
17 DeprecatedClass lvd = new DeprecatedClass();
18 return null;
19 }
20
21 @Deprecated
22 public void methodD() {
23 }
24
25 @DeprecatedAnnotation
26 DeprecatedClass field = new DeprecatedClass();
27
28 @DeprecatedAnnotation
29 class Inner extends DeprecatedClass implements DeprecatedInterface {
30 }
31
32 }
33
34 @Deprecated class DeprecatedClass extends Throwable { }
35 @Deprecated interface DeprecatedInterface { }
36 @Deprecated @interface DeprecatedAnnotation { }

mercurial