Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4370719
Votes 0
Synopsis Better diagnosis of bad class file name/package name.
Category java:javadoctool
Reported Against 1.2 , merlin-rc1
Release Fixed 1.4.1(hopper)
State 10-Fix Delivered, Verified, bug
Priority: 5-Very Low
Related Bugs 4638053
Submit Date 13-SEP-2000
Description
...When you write a shell script in Solaris to run javadoc 
(let's name it "run-javadoc"), such as the following:

/usr/local/java/jdk1.3/solaris/bin/javadoc -d docs \ 
java.applet 

and if you mistakenly put a space after a continuation character (\),
such as at the end of the second line, you get this misleading
error message:

% run-javadoc
javadoc: No package, class, or source file found named  .
1 error
run-minimal: java.applet: not found

The error message always says that the statement following the extra space
is not found.  It took me about 20 minutes to figure out the extra space 
was causing this problem.  What we need is a message that is not misleading,
and can better pinpoint the problem.
Work Around
N/A
Evaluation
I'm not sure this is even possible, but if so, it would be quite helpful.
(Submitted by me)
 xxxxx@xxxxx  2000-12-08

Well, we could certainly put quotes areound the file name in the error message. Cheap and easy.

 xxxxx@xxxxx  2000-12-13

Doug Kramer wrote:
> I'm not clear on your proposal to put quotes around the file name.
> How would that help?
> The problem is that the error message does not mention that
> there is an extra space following the continuation character.
> (I'm not sure if javadoc can be aware of this extra space.)

javadoc doesn't know there was a continuation character. That's a
function of your shell.

That is a perfectly valid syntax for specifying a file whose name is a
space. If our error message produced quotes around the filename, you
would see that we're trying to process a file named " ".

Changed the synopsis from
	javadoc: Better error msg when space follows continuation char in shell script
to
	javadoc: Error message when failing to open file should quote filename

 xxxxx@xxxxx  2000-12-14
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang