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

CONFORMANCE: @Override specification and compiler inconsistent

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b86
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: