1008N/A/**
1008N/A * @test /nodynamiccopyright/
1008N/A * @bug 4986256
1008N/A * @compile/ref=Deprecation.noLint.out -XDrawDiagnostics Deprecation.java
1008N/A * @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation -XDrawDiagnostics Deprecation.java
1008N/A * @compile/ref=Deprecation.lintAll.out -Xlint:all,-path -XDrawDiagnostics Deprecation.java
1008N/A */
1008N/A
1008N/A@Deprecated
1008N/Aclass Deprecation
1008N/A{
1008N/A}
1008N/A
1008N/A// control: this class should generate warnings
1008N/Aclass Deprecation2
1008N/A{
1008N/A void m() {
1008N/A Object d = new Deprecation();
1008N/A }
1008N/A}
1008N/A
1008N/A// tests: the warnings that would otherwise be generated should all be suppressed
1008N/A@SuppressWarnings("deprecation")
1008N/Aclass Deprecation3
1008N/A{
1008N/A void m() {
1008N/A Object d = new Deprecation();
1008N/A }
1008N/A}
1008N/A
1008N/Aclass Deprecation4
1008N/A{
1008N/A @SuppressWarnings("deprecation")
1008N/A void m() {
1008N/A Object d = new Deprecation();
1008N/A }
1008N/A}
1008N/A
1008N/Aclass Deprecation5
1008N/A{
1008N/A void m() {
1008N/A @SuppressWarnings("deprecation")
1008N/A class Inner {
1008N/A void m() {
1008N/A Object d = new Deprecation();
1008N/A }
1008N/A }
1008N/A }
1008N/A}
1008N/A
1008N/A// this class should produce warnings because @SuppressWarnings should not be inherited
1008N/Aclass Deprecation6 extends Deprecation3
1008N/A{
1008N/A void m() {
1008N/A Object d = new Deprecation();
1008N/A }
1008N/A}
1008N/A