Mon, 23 Sep 2013 17:27:38 +0400
7154966: CRs found to be in Fixed state with no test and no noreg- keyword.
Reviewed-by: ksrini
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 */
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 }
21 @Deprecated
22 public void methodD() {
23 }
25 @DeprecatedAnnotation
26 DeprecatedClass field = new DeprecatedClass();
28 @DeprecatedAnnotation
29 class Inner extends DeprecatedClass implements DeprecatedInterface {
30 }
32 }
34 @Deprecated class DeprecatedClass extends Throwable { }
35 @Deprecated interface DeprecatedInterface { }
36 @Deprecated @interface DeprecatedAnnotation { }