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: 4136558
Votes 0
Synopsis javadoc tool: error exit status from doclet is not reflected by javadoc
Category java:javadoctool
Reported Against 1.2beta4
Release Fixed 1.4(merlin-beta)
State 10-Fix Delivered, Verified, bug
Priority: 5-Very Low
Related Bugs
Submit Date 08-MAY-1998
Description
.Tested in JDK1.2Beta4-E.

Run javadoc command with custom doclets using option -doclet, error exit status from doclets is not reflected by javadoc:

$ javadoc -doclet Test Test.java
Loading source file Test.java...
Constructing Javadoc information...

$ echo $?
0

$ more Test.java
import com.sun.javadoc.*;

public class Test extends Doclet {
  
  public static boolean start(RootDoc root) {
    return false;
  }
}
$ 
Work Around
Use printError() this will increment the error count and cause a 
non-zero exit status.
 xxxxx@xxxxx  1998-05-08
Evaluation
Okay.
 xxxxx@xxxxx  1998-05-14

Check with Robert on how to properly implement this before actually doing it.
 xxxxx@xxxxx  1998-05-18

In Main.main, the return value from the doclet is ignored. 
	// pass off control to the doclet
	docletInvoker.start(root);
I think what should happen is, if nerrors is 0, that is if the doclet 
did not call printError to generate their own error, one should be 
printed for them - "Doclet failed".  Then, when Main.exit is called
the exit status will be correct.
 xxxxx@xxxxx  1999-06-24

No diagnostic is required - the doclet can print its own error messages.
I have fixed javadoc to use the exit status of the doclet.

 xxxxx@xxxxx  2001-02-26
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang