-
Bug
-
Resolution: Fixed
-
P4
-
1.4.2
-
tiger
-
x86
-
windows_2000
[This bug is re-written from bug 4854934]
It appears that when method A.m overrides method in external referenced class B,
the "Overrides:" section is not generated (but should be). That is, if B is not
passed in on the command line, javadoc does not create the "Overrides:" section
for method m. If B is passed in, then it does create the "Overrides:" section.
Example: Given this source file with method read() that overrides
"public int read()" in FilterReader:
---------------- XReader.java ---------------------
public class XReader extends java.io.FilterReader {
/**
* This is a doc comment
*/
public int read() {
return 'W';
}
}
---------------------------------------------------
Generate the HTML documentation using Javadoc 1.4.2-beta:
javadoc -d html XReader.java
The generated HTML documentation for XReader.read()
is missing any "Overrides:" labels. It actually looks
like this:
-----------------------------
read
public int read()
This is a doc comment
------------------------------
It should instead look like this, with override labels:
-----------------------------
read
public int read()
This is a doc comment
Overrides:
read in class FilterReader
~~~~ ~~~~~~~~~~~~
------------------------------
Adding the -link or -linkoffline option makes no difference --
the labels and links still do not appear when trying this:
javadoc -d html -linkoffline "http://java.sun.com/j2se/1.4/docs/api" . XReader.java
In this case, "read" should be a link to java/io/FilterReader.html#read()
and "FilterReader" should be a link to java/io/FilterReader.html,
identical to this J2SE class that extends FilterReader:
http://java.sun.com/j2se/1.4.1/docs/api/java/io/PushbackReader.html#read()
The presence of these labels and links should be independent
of inheriting doc comments.
FWIW, I tested for the presenece of "Specified by:" when implementing
an external referenced class (to see if it's a problem), and it works
just fine, producing "Specified by:" labels and links. Here's that source
file:
----------------- XComparable.java -----------------------
public class XComparable implements java.lang.Comparable {
public int compareTo(Object o) {
return 'W';
}
}
--------------------------------------------------------
It appears that when method A.m overrides method in external referenced class B,
the "Overrides:" section is not generated (but should be). That is, if B is not
passed in on the command line, javadoc does not create the "Overrides:" section
for method m. If B is passed in, then it does create the "Overrides:" section.
Example: Given this source file with method read() that overrides
"public int read()" in FilterReader:
---------------- XReader.java ---------------------
public class XReader extends java.io.FilterReader {
/**
* This is a doc comment
*/
public int read() {
return 'W';
}
}
---------------------------------------------------
Generate the HTML documentation using Javadoc 1.4.2-beta:
javadoc -d html XReader.java
The generated HTML documentation for XReader.read()
is missing any "Overrides:" labels. It actually looks
like this:
-----------------------------
read
public int read()
This is a doc comment
------------------------------
It should instead look like this, with override labels:
-----------------------------
read
public int read()
This is a doc comment
Overrides:
read in class FilterReader
~~~~ ~~~~~~~~~~~~
------------------------------
Adding the -link or -linkoffline option makes no difference --
the labels and links still do not appear when trying this:
javadoc -d html -linkoffline "http://java.sun.com/j2se/1.4/docs/api" . XReader.java
In this case, "read" should be a link to java/io/FilterReader.html#read()
and "FilterReader" should be a link to java/io/FilterReader.html,
identical to this J2SE class that extends FilterReader:
http://java.sun.com/j2se/1.4.1/docs/api/java/io/PushbackReader.html#read()
The presence of these labels and links should be independent
of inheriting doc comments.
FWIW, I tested for the presenece of "Specified by:" when implementing
an external referenced class (to see if it's a problem), and it works
just fine, producing "Specified by:" labels and links. Here's that source
file:
----------------- XComparable.java -----------------------
public class XComparable implements java.lang.Comparable {
public int compareTo(Object o) {
return 'W';
}
}
--------------------------------------------------------
- duplicates
-
JDK-4854934 RFE: "Specified by:" and "Overrides:" Links Should be Available
-
- Closed
-