test/tools/javac/mandatoryWarnings/deprecated/Q.java

Mon, 16 Sep 2013 14:13:44 +0200

author
jlahoda
date
Mon, 16 Sep 2013 14:13:44 +0200
changeset 2028
4ce8148ffc4f
parent 0
959103a6100f
permissions
-rw-r--r--

8021112: Spurious unchecked warning reported by javac
6480588: No way to suppress deprecation warnings when implementing deprecated interface
Summary: Fixing DeferredLintHandler configuration, so lint warnings are reported with correct @SuppressWarnings settings
Reviewed-by: jjg, vromero

     1 /* /nodynamiccopyright/ */
     2 // Q has overrides a deprecated method,
     3 // which will generate a warning when Q is entered
     4 class Q extends Q2
     5 {
     6     @Deprecated void foo() {  }
     7     void bar() { }  // warning: override deprecated method
     8 }
    10 class Q2 {
    11     @Deprecated void bar() { }
    12 }
    14 // Q3 is not required in order to compile Q or Q2,
    15 // and will therefore be attributed later
    16 class Q3 {
    17     void baz() { new Q().foo(); } // warning: call deprecated method
    18 }

mercurial