Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6308109

Compiler issues same [deprecation] warning twice

XMLWordPrintable

    • generic
    • generic

      Tried on Solaris -10
      JDK :java version "1.6.0-ea" (build 1.6.0-ea-b46)

      Compiler issues same [deprecation] warning twise in the following condition

      <code>
      @Deprecated
      abstract class TestOne{
          @Deprecated
          protected abstract void abstractMethod();
      }
      abstract class TestTwo extends TestOne{
          public void abstractMethod(){
              //...
          }
          @Deprecated
          protected abstract void abstractMethod1();
      }
      </code>
      output of the code when compiled
      <output>
      bash-3.00$ javac -Xlint Test7.java
      Test7.java:7: warning: [deprecation] abstractMethod() in TestOne has been deprecated
          public void abstractMethod(){
                      ^
      Test7.java:7: warning: [deprecation] abstractMethod() in TestOne has been deprecated
          public void abstractMethod(){
                      ^
      2 warnings
      bash-3.00$
      </output>

            mcimadamore Maurizio Cimadamore
            savadhansunw Seetharama Avadhanam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: