JDK-4778264 : {@inheritDoc} does not copy from interface definition properly, hangs
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2002-11-13
  • Updated: 2020-08-31
  • Resolved: 2002-11-14
Related Reports
Duplicate :  
Description

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) 
======================================================================

Comments
PUBLIC COMMENTS This bug is identical to 4720974, whihc has been fixed for the next release of J2SE.
10-06-2004

EVALUATION Can reproduce in 1.4.1_01, but cannot reproduce in 1.4.2. ###@###.### 2002-11-13
13-11-2002