JDK-4434834 : javadoc tool: non .java filenames are taken by default as package names.
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P5
  • Affected Version: 1.4.0
  • OS: solaris_8
  • CPU: sparc
  • Submit Date: 2001-04-06
  • Updated Date: 2002-06-27
  • Resolved Date: 2002-03-08
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.
1.4.1 hopperFixed
The new javadoc correctly does not allow non ".java" files as they were in old Javadoc. Any file with non ".java" extension is rejected. But the error message needs more clarity. Please find the command and the message attached below.
blr-sunray:/home/vr128054/jdk-latest/jdk1.4.0/src/javax/swing 654 % java   -Dfile.encoding=EUC-JP   -Xbootclasspath/p:/home/vr128054/gj/gjclasses3   -classpath /home/vr128054/gj/gjclasses3   com.sun.tools.javadoc.Main JPanel.xxx
Loading source files for package JPanel.xxx...
javadoc: No source files for package JPanel/xxx 
1 error
While it is perfectly valid to reject .xxx extension, by default, a "." shouldnt
be considered a package name delimiter. A filename level error message could be more informative.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper

SUGGESTED FIX While encountering a non ".java" extension, a simple check to find whether it's a file or a directory can help add more clarity. If it is a file, print error messge "only '.java' files are accepted" else consider it a package and proceed.


EVALUATION On the contrary: the "." IS the package delimiter. We only make a special case of handling ".java" to treat it as a file name. However, in a command such as javadoc a/b.c where a/b.c could neither be a valid source file name nor a package name, we should just say so. neal.gafter@Eng 2001-04-11