United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4496290 : REGRESSION: -use is severely broken

Details
Type:
Bug
Submit Date:
2001-08-24
Status:
Resolved
Updated Date:
2014-05-05
Project Name:
JDK
Resolved Date:
2002-04-25
Component:
tools
OS:
windows_nt,linux,generic,windows_2000
Sub-Component:
javadoc(tool)
CPU:
x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.1 (hopper)

Related Reports
Duplicate:
Duplicate:
Duplicate:

Sub Tasks

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



Hardware and Software, Engineered to Work Together