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

CONFORMANCE: @Override specification and compiler inconsistent

XMLWordPrintable

    • b86
    • x86
    • windows_xp
    • Verified

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      @Override indicates that a method declaration is intended to not only override but also implement a method declaration in a superclass.
      http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.4.3
      -----
      abstract class C1 {
          public void m1() {
          }

          public abstract void m2();
      }

      class C2 extends C1 {
          @Override
          public void m1() {
          }

          @Override
          public void m2() {
          }
      }
      -----
      Please revise the documentation (http://download.java.net/jdk6/docs/api/java/lang/Override.html) or the implementation.
      The JLS should explain it more strictly, too.
      http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6.1.4


      REPRODUCIBILITY :
      This bug can be reproduced always.

            ahe Peter Ahe
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: