1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Q.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,18 @@ 1.4 +/* /nodynamiccopyright/ */ 1.5 +// Q has overrides a deprecated method, 1.6 +// which will generate a warning when Q is entered 1.7 +class Q extends Q2 1.8 +{ 1.9 + @Deprecated void foo() { } 1.10 + void bar() { } // warning: override deprecated method 1.11 +} 1.12 + 1.13 +class Q2 { 1.14 + @Deprecated void bar() { } 1.15 +} 1.16 + 1.17 +// Q3 is not required in order to compile Q or Q2, 1.18 +// and will therefore be attributed later 1.19 +class Q3 { 1.20 + void baz() { new Q().foo(); } // warning: call deprecated method 1.21 +}