United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4673477 regression: Duplicate classes not documented
JDK-4673477 : regression: Duplicate classes not documented

Details
Type:
Bug
Submit Date:
2002-04-24
Status:
Resolved
Updated Date:
2003-04-12
Project Name:
JDK
Resolved Date:
2002-09-02
Component:
tools
OS:
generic
Sub-Component:
javadoc(tool)
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

Description
It appears that javadoc now fails to document duplicate .java files
in the sourcepath.  In JDK 1.3.1 and prior, javadoc behaved similarly
to javac: The first occurrence found in the sourcepath is processed.
Now if duplicate class definitions are found, the class is not documented
and subsequent references to the class are broken.

This is a problem because products in J2ME are often composed of a
stack of source bases, where superset class definitions are given priority
in the classpath.  The 1.4.x javadoc tool doesn't do this, so it seems
to break compatibility with previous versions and no longer behave
similarly to javac.


Sample: 3 files

./one/a/Foo.java
./two/a/Foo.java
./three/b/Bar.java

--- ./one/a/Foo.java ---
package a;

public class Foo {

}
---

--- ./two/a/Foo.java ---
package a;

public class Foo {

}
---

--- ./three/b/Bar.java ---
package b;

import a.Foo;

public class Bar extends Foo {

}
---

% javadoc -d docs -sourcepath one:two:three a b
Loading source files for package a...
Loading source files for package b...
Constructing Javadoc information...
/home/courtney/test/javadoc/two/a/Foo.java:3: duplicate class: a.Foo
public class Foo {
       ^
/home/courtney/test/javadoc/three/b/Bar.java:5: cannot resolve symbol
symbol  : class Foo 
location: class b.Bar
public class Bar extends Foo {
                         ^
Standard Doclet version 1.4.1

Generating docs/constant-values.html...
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating docs/overview-tree.html...
Generating docs/index-all.html...
Generating docs/deprecated-list.html...
Building index for all classes...
Generating docs/allclasses-frame.html...
Generating docs/allclasses-noframe.html...
Generating docs/index.html...
Generating docs/packages.html...
Generating docs/overview-summary.html...
Generating docs/overview-frame.html...
Generating docs/a/package-frame.html...
Generating docs/a/package-summary.html...
Generating docs/a/package-tree.html...
Generating docs/b/package-frame.html...
Generating docs/b/package-summary.html...
Generating docs/b/package-tree.html...
Generating docs/b/Bar.html...
Generating docs/serialized-form.html...
Generating docs/package-list...
Generating docs/help-doc.html...
Generating docs/stylesheet.css...
2 warnings

                                    

Comments
EVALUATION

This change in (undocumented) behavior is preventing a number of groups
from migrating from 1.3.1 to 1.4.x

###@###.### 2002-04-24
                                     
2002-04-24
PUBLIC COMMENTS

...
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis
mantis-b02

FIXED IN:
mantis
mantis-b02

INTEGRATED IN:
mantis
mantis-b02


                                     
2004-06-14



Hardware and Software, Engineered to Work Together