JDK-4638053 : javadoc should complain about an invalid package name.
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-02-14
  • Updated: 2002-06-27
  • Resolved: 2002-03-04
Related Reports
Duplicate :  
Description

Name: dk30142			Date: 02/14/2002


All messages that display package, class, interface or member
names should have quotes around the name, in case the name is
a space or is empty.  This enables the person reading the message
to tell what name javadoc is looking for.

For example, this message says:

  javadoc: No source files for package  

Instead, it should have quotes around the package name

  javadoc: No source files for package " "

I can reproduce this message when the following script is
saved to a file and executed at /home/dkramer/javadoc/mifdoclet/1.2b2
as the current directory.  Notice there is a space
after the continuation character '\' following sample-src, which 
is the error.

#!/bin/csh -x

#/java/re/jdk/1.2.2/archive/cricket/binaries/solaris/bin/javadoc 
/java/re/jdk/1.4.0/nightly/binaries/solsparc/latest/bin/javadoc -doclet com.sun.tools.doclets.mif.MIFDoclet -docletpath
/java/jdk/ws/tools/doclets/mif/dkramer/build/solaris/jar/mifdoclet.jar -J-Xmx20M -d docs -sourcepath ./test/sample-src \ 
com.package1 com.package2


======================================================================

Comments
WORK AROUND Name: dk30142 Date: 02/14/2002 ======================================================================
11-06-2004

PUBLIC COMMENTS ...
10-06-2004

EVALUATION There is a bug here in that javadoc accepts " " as a package name, when it is not a valid package name. Instead of quoting all diagnosics containins names as the submitter suggests, instead we should add a message for the case when the package name given on the command line isn't a valid package name; in that case we SHOULD quote the package name. When the package name is valid, the quotes are unnecessary as the diagnostic is clear. ###@###.### 2002-02-14
14-02-2002