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

javadoc allows a static method to hide an instance method (of super).

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • tools

      Consider the following files
      -----------------------------
      jtools-sqe:/home/vr128054/vertest/work 297 % more test.java
      public class test
      {
              public void doNothing ()
              {
              }
      }
      jtools-sqe:/home/vr128054/vertest/work 298 % more second.java
      public class second extends test
      {
              public static void doNothing ()
              {
              }
      }

      Followed is the Javac Behaviour (right)
      ---------------------------------------
      jtools-sqe:/home/vr128054/vertest/work 299 % javac *.java
      second.java:3: doNothing() in second cannot override doNothing() in test; doNothing() and doNothing() are static
              public static void doNothing ()
                                 ^
      1 error

      Followed is the Javadoc behaviour (Wrong )
      -------------------------------------------

      jtools-sqe:/home/vr128054/vertest/work 300 % javadoc *.java
      Loading source file second.java...
      Loading source file test.java...
      Constructing Javadoc information...
      Standard Doclet version 1.4 beta (04 Aug 2001)

      Building tree for all the packages and classes...
      Building index for all the packages and classes...
      Generating overview-tree.html...
      Generating index-all.html...
      Generating deprecated-list.html...
      Building index for all classes...
      Generating allclasses-frame.html...
      Generating allclasses-noframe.html...
      Generating index.html...
      Generating packages.html...
      Generating second.html...
      Generating test.html...
      Generating package-list...
      Generating help-doc.html...
      Generating stylesheet.css...

            gafter Neal Gafter (Inactive)
            rvijayansunw Ra Vijayan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: