-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b61
-
generic
-
generic
If I inheritDoc once, it works.
But if I inheritDoc again on a doc comment that has used that
same mechanism in turn, the first sentence is incorrectly
recognized -- it becomes the entire doc comment.
The implementation of {@inheritDoc} must be able to handle
arbitrary levels of recursive expansion.
Self-explanatory shell transcript follows.
(Note that the summary for C3 is different from C2,
which is wrong.)
$ cat C1.java
public class C1 {
/**
* First sentence. Second sentence.
*/
public void m() {}
}
$ cat C2.java
public class C2 extends C1 {
/**
* {@inheritDoc}
*
* <p>Third sentence. Fourth sentence.
*/
public void m() {}
}
$ cat C3.java
public class C3 extends C2 {
/**
* {@inheritDoc}
*
* <p>Fifth sentence. Sixth sentence.
*/
public void m() {}
}
$ javadoc C?.java >/dev/null && grep 'First sentence' C?.html
C1.html: First sentence.</TD>
C1.html:<DD>First sentence. Second sentence.
C2.html: First sentence.</TD>
C2.html:<DD>First sentence. Second sentence.
C3.html: First sentence. Second sentence.</TD>
C3.html:<DD>First sentence. Second sentence.
###@###.### 2005-04-11 21:49:25 GMT
But if I inheritDoc again on a doc comment that has used that
same mechanism in turn, the first sentence is incorrectly
recognized -- it becomes the entire doc comment.
The implementation of {@inheritDoc} must be able to handle
arbitrary levels of recursive expansion.
Self-explanatory shell transcript follows.
(Note that the summary for C3 is different from C2,
which is wrong.)
$ cat C1.java
public class C1 {
/**
* First sentence. Second sentence.
*/
public void m() {}
}
$ cat C2.java
public class C2 extends C1 {
/**
* {@inheritDoc}
*
* <p>Third sentence. Fourth sentence.
*/
public void m() {}
}
$ cat C3.java
public class C3 extends C2 {
/**
* {@inheritDoc}
*
* <p>Fifth sentence. Sixth sentence.
*/
public void m() {}
}
$ javadoc C?.java >/dev/null && grep 'First sentence' C?.html
C1.html: First sentence.</TD>
C1.html:<DD>First sentence. Second sentence.
C2.html: First sentence.</TD>
C2.html:<DD>First sentence. Second sentence.
C3.html: First sentence. Second sentence.</TD>
C3.html:<DD>First sentence. Second sentence.
###@###.### 2005-04-11 21:49:25 GMT