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

{@inheritDoc} does not copy from interface definition properly, hangs

XMLWordPrintable



      Name: gm110360 Date: 11/13/2002


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)


      FULL OPERATING SYSTEM VERSION : Redhat 8.0, 2.4.18 Glibc,
      glibc-2.2.93-5


      A DESCRIPTION OF THE PROBLEM :
      {@inheritDoc} handling does not allow you to copy javdoc
      down more than once. Rather than issue any warnings, it
      simply hangs, eventually crashing with an OutOfMemoryError

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Try to generate the javadoc for the code listing below.
           javadoc -private A.java
      2. javadoc will hang every time.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      It should work properly, and copy the javadoc down from the
      nearest superclass.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No errors or warnings, eventually javadoc fails with an OutOfMemoryError.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- A.java --------------
      public interface A
      {
              /**
               * Returns the size of this A.
               *
               * @return The size of this A.
               */
              public int size();
      }

      abstract class B implements A
      {
              /**
               * {@inheritDoc}
               *
               * @return {@inheritDoc}
               */
              public int size()
              {
                      return 0;
              }
      }

      class C extends B
      {
              /**
               * {@inheritDoc}
               *
               * @return {@inheritDoc}
               */
              public int size()
              {
                      return 1;
              }
      }
      ---------- END A.java ----------

      CUSTOMER WORKAROUND :
      Don't use {@inheritDoc}, copy comments by hand. This, like
      the first sentence calculation bug, basically makes
      {@inheritDoc} useless.
      (Review ID: 166856)
      ======================================================================

            jhosunw Jamie Ho (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: