Name: nt126004 Date: 05/30/2002
FULL PRODUCT VERSION :
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows 98 [versione 4.10.2222]
A DESCRIPTION OF THE PROBLEM :
Hello,
I think there is a bug in Javadoc concerning nested classes
ClassDoc records extracted through the doclet API.
In particular,
ClassDoc records are correct if the container class is directly
specified on the command line as a .java file or part of a package (i.e. the
source is available), but they are (at times) wrong if the records are
built from .jar (.class) files through the classpath.
Example with
"java.io.ObjectOutputStream" from JDK 1.3.1_01:
If the ClassDoc
for this class comes from RootDoc.specifiedClasses(), its nested
classes are correctly listed as:
private static final class java.io.ObjectOutputStream.HandleTable
public abstract static class java.io.ObjectOutputStream.PutField
static final class java.io.ObjectOutputStream.PutFieldImpl
private static final class java.io.ObjectOutputStream.ReplaceTable
private static final class java.io.ObjectOutputStream.Stack
but if the ClassDoc
of the container class is extracted from a method parameter, like in
org.apache.xerces.dom.ParentNode.writeObject(ObjectOutputStream
out), this is the result:
final synchronized class java.io.ObjectOutputStream$HandleTable
public abstract static class java.io.ObjectOutputStream.PutField
static final class java.io.ObjectOutputStream.PutFieldImpl
final synchronized class java.io.ObjectOutputStream$ReplaceTable
final synchronized class java.io.ObjectOutputStream$Stack
According
to my tests, at least ClassDoc.modifiers(), ClassDoc.qualifiedName()
and ClassDoc.containingClass() return incorrect results for
HandleTable, ReplaceTable and Stack.
This behaviour seems common
to both Javadoc 1.3.1_01 and 1.4beta3.
This bug can be reproduced occasionally.
(Review ID: 146941)
======================================================================