Incorrect ClassDoc for nested classes
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. I admit I didn't test 1.4 final, but I searched the Javadoc site, the forum and the bug database without finding anything similar.
Thanks in advance for any help.
Amedeo Farello

