Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4496290
Votes 1
Synopsis REGRESSION: -use is severely broken
Category doclet:tbd
Reported Against 1.4 , merlin-beta2 , merlin-beta3
Release Fixed 1.4.1(hopper)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4615006 , 4640428 , 4704312
Submit Date 24-AUG-2001
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) {
	}
    }
}
==============================
This bug has been fixed.  The -use option now works properly.

  xxxxx@xxxxx   2002-04-15The -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) {
	}
    }
}





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




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)
======================================================================
Work Around
N/A
Evaluation
Data loss.
  xxxxx@xxxxx   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
Comments
  
  Include a link with my name & email   

Submitted On 04-SEP-2002
jglick
Please don't forget to regenerate

http://java.sun.com/j2se/1.4/docs/api/

with the fixed Javadoc! The currently published HTML is
substantially less useful (forgive the pun) than it could be.



PLEASE NOTE: JDK6 is formerly known as Project Mustang