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

[1923 byte] By [afarelloa] at [2007-9-27 5:48:00]
# 1

Thank you for looking into this.

This is beyond my understanding of the Doclet API.

Please submit this as a bug using the instructions at:

http://java.sun.com/j2se/javadoc/faq/index.html#submitbugs

and please email the ID number you get back to me

at javdoc-tool@sun.com so I can make sure it gets

past our initial reviewers and into our bug database so

our javadoc engineer can look at it.

-Doug Kramer

Javadoc team

dkramera at 2007-7-8 8:10:05 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...