JDK-4673477 : regression: Duplicate classes not documented
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-04-24
  • Updated: 2003-04-12
  • Resolved: 2002-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
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
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

PUBLIC COMMENTS ...
2004-06-10

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