JDK-4496290 : REGRESSION: -use is severely broken
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux,windows_nt,windows_2000
  • CPU: generic,x86
  • Submitted: 2001-08-24
  • Updated: 2014-05-05
  • Resolved: 2002-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.1 hopperFixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
The -use option appears to produce grossly incomplete information. For example,
-use on the following produces a page for class JD that claims "No usage of jd.JD". In general there seems to be problems with finding uses in parameter types.

package jd;

public class JD {

    public static class Bar {
	public void foo(JD o) {
	}
    }
}


Name: rmT116609			Date: 02/22/2002


DESCRIPTION OF THE PROBLEM :

The "Use" page for a class in the documentation generated by javadoc does not list places where that class is used as an array type.

An example in the JDK1.4 API javadocs where I noticed this is for the class java.lang.StackTraceElement:

http://java.sun.com/j2se/1.4/docs/api/java/lang/StackTraceElement.html

If you click the Use link at the top of the page it will report that there are no uses of the class. This is not exactly true. If you go to the docs for
java.lang.Throwable.getStackTrace:

http://java.sun.com/j2se/1.4/docs/api/java/lang/Throwable.html#getStackTrace()

You will see that it is used in the API, it's just that it is used in the form of an array. As a user of the Javadocs, you would want the "Use" page to return uses as an array of that type as well.
(Review ID: 143203)
======================================================================

Name: rmT116609			Date: 03/15/2002


DESCRIPTION OF THE PROBLEM :

It appears that the class-use pages in the Javadoc- generated API documentation were not generated correctly.

For example, the class-use page for java.net.URLStreamHandler.html, in the documentation bundle at:

http://java.sun.com/j2se/1.4/docs/api/java/net/URLStreamHandler.html says:

    No usage of java.net.URLStreamHandler

However, in class java.net.URLStreamHandlerFactory, method createURLStreamHandler(String) returns type URLStreamHandler.




(Review ID: 144245)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper
2004-06-14

EVALUATION Data loss. ###@###.### 2001-08-25 To keep track of class and package usage, the standard doclet creates Doc/List hash tables where the key is a ClassDoc or PackageDoc and the List is a list of Doc objects that use the key. This way of determining class and package usage worked fine with previous versions of the Java tool, but it does not seem to work with merlin. After doing some testing, I concluded that Doc objects should not be used as a key in the hash table. They are not unique (i.e. the Javadoc tool seems to be capable of creating two different ClassDoc objects that represent the same class). To fix this bug, I used the qualified name as the key in the hash table. A regression test has been added at: test/com/sun/javadoc/testUseOption/testUseOptionWrapper.sh
2004-06-11

PUBLIC COMMENTS The -use option appears to produce grossly incomplete information. For example, -use on the following produces a page for class JD that claims "No usage of jd.JD". In general there seems to be problems with finding uses in parameter types. package jd; public class JD { public static class Bar { public void foo(JD o) { } } } ============================== This bug has been fixed. The -use option now works properly. ###@###.### 2002-04-15
2002-04-15