United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4530727 : 'Throws' heading missing when followed only by auto-generated exceptions

Details
Type:
Bug
Submit Date:
2001-11-22
Status:
Closed
Updated Date:
2014-05-05
Project Name:
JDK
Resolved Date:
2002-10-25
Component:
tools
OS:
solaris_9,windows_nt
Sub-Component:
javadoc(tool)
CPU:
x86,sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports
Duplicate:

Sub Tasks

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()

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b05

VERIFIED IN:
mantis


                                     
2004-06-14
PUBLIC COMMENTS

This bug has been fixed.  The Throws heading is now printed for exceptions that are declared but not documented.
                                     
2004-06-10
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
to:
  "Throws" heading missing when followed only by auto-generated exceptions
###@###.### 2002-04-25

I have fixed this bug. The bug fix is pending review.
###@###.### 2002-07-08
                                     
2002-04-25



Hardware and Software, Engineered to Work Together