Name: jl125535 Date: 02/20/2003
FULL PRODUCT VERSION :
java version "1.4.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
FULL OS VERSION :
SunOS fid 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-60
Windows_NT IDAHO 4 00 586
A DESCRIPTION OF THE PROBLEM :
Packages which end in ".java" cause problems for javadoc.
Javadoc does not parse these as packages & instead parses them as files:
Note: 'Loading source file...' when it should be 'Loading source files for package...'
Example:
javadoc com.mycompany.modules.java com.mycompany.jsp
Error message:
Loading source file com.mycompany.modules.java...
error: cannot read: com.mycompany.modules.java
Loading source files for package com.mycompany.modules...
Loading source files for package com.mycompany.modules.jsp...
1 error
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
mkdir -p src/com/foo/java
cat > src/com/foo/java/One.java
package com.foo.java;
public class One {
public static void main(String[] arg) {
System.out.println("ONE");
}}
^D // Control-D
javadoc -sourcepath src com.foo.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
If all went well, the output would have been:
Loading source files for package com.foo.java...
Constructing Javadoc information...
Standard Doclet version 1.4.0
Generating constant-values.html...
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating overview-tree.html...
Generating index-all.html...
Generating deprecated-list.html...
Building index for all classes...
Generating allclasses-frame.html...
Generating allclasses-noframe.html...
Generating index.html...
Generating packages.html...
Generating com/foo/java/package-frame.html...
Generating com/foo/java/package-summary.html...
Generating com/foo/java/package-tree.html...
Generating com/foo/java/One.html...
Generating package-list...
Generating help-doc.html...
Generating stylesheet.css...
Instead, your output will be:
Loading source file com.foo.java...
error: cannot read: com.foo.java
1 error
ERROR MESSAGES/STACK TRACES THAT OCCUR :
see above.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above.
Paste everything but the "control-D"
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
don't generate javadocs for packages ending in .java
(note, com.foo.java.bar works fine).
(Review ID: 181585)
======================================================================