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: 4530727
Votes 0
Synopsis 'Throws' heading missing when followed only by auto-generated exceptions
Category doclet:tbd
Reported Against 1.4 , merlin-beta3
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs 4715471
Submit Date 22-NOV-2001
Description
When the class defines a method that throws an exception, but not document it with @throws or @exception, Javadoc attempts to create a throws reference. This is an excellent feature.

But it also creates a redundant 'blank' reference below the earlier said one. This should be removed.

Consider the following program
==============================
public class test
{
        public void doNothing () throws myException
        {
        }

}

class myException extends Exception
{
}


Use merlin-rc1, and do
javadoc -private test.java


Observe the result at
test.html#doNothing()
Work Around
N/A
Evaluation
Confirmed.  However, the problem is that the "Throws" heading is missing,
so it appears that like the repeated exception is mistaken.

The result looks liks this in a browser:

public void doNothing()
               throws p.myException

    p.myException


The HTML looks like this: ------------------

<PRE>
public void <B>doNothing</B>()
               throws p.myException</PRE>
<DL>
<DD><DL>

<DD><CODE>p.myException</CODE></DL>
</DD>
</DL>

The HTML should look like this: ----------------

<PRE>
public void <B>doNothing</B>()
               throws p.myException</PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>p.myException</CODE></DL>
</DD>
</DL>

Changed synopsis from:
  redundant reference to exception class when method throws without @throws

  "Throws" heading missing when followed only by auto-generated exceptions
  xxxxx@xxxxx   2002-04-25

I have fixed this bug. The bug fix is pending review.
  xxxxx@xxxxx   2002-07-08
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang