United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4525364 : REGRESSION: javadoc ignores duplicate @throws tag

Details
Type:
Bug
Submit Date:
2001-11-09
Status:
Closed
Updated Date:
2014-05-05
Project Name:
JDK
Resolved Date:
2002-04-06
Component:
tools
OS:
solaris_9,windows_2000
Sub-Component:
javadoc(tool)
CPU:
x86,sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.1
Fixed Versions:
1.4.1 (hopper)

Related Reports
Duplicate:

Sub Tasks

Description
Name: nt126004			Date: 11/09/2001

C:\>java -version
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

If the javadoc documentation of a method contains multiple @throws tag for the
same exception, only the first @throws tag is used and the others (of the same
exception) are ignored.

Follow these steps to reproduce the problem:

1. create a Test.java file containing the following source:

public class Test {

  /**
   * A test method.
   * <p>
   * @throws IllegalArgumentException If a occurs.
   * @throws IllegalArgumentException If b occurs.
   */
  public void test() {}

}

2. Generate the html files using the javadoc tool:
javadoc Test.java

3. Take a look at the generated html files and notice that only the first
exception is declared in the html documentation. This is the relevant section
of the html code:

<A NAME="test()"><!-- --></A><H3>
test</H3>
<PRE>
public void <B>test</B>()</PRE>
<DL>
<DD>A test method.
 <p>
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If a occurs.</DL>
</DD>
</DL>

As you can see, only the first @throws tag is included. The second one is
ignored.

Also note that this problem does NOT occur when I use JDK 1.3.1_01a

Maarten
(Review ID: 135271) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
hopper

FIXED IN:
hopper

INTEGRATED IN:
hopper

VERIFIED IN:
hopper-beta


                                     
2004-06-14
EVALUATION

Need to determine if this is a doclet issue.
###@###.### 2001-11-13

This bug has been fixed.  Location of fix:

ThrowsTaglet.java

Regression test added:

TestDupThrowsTagsWrapper.sh
###@###.### 2002-03-29

Verified using TestDupThrowsTagsWrapper.sh
###@###.### 2002-04-25
                                     
2002-03-29
PUBLIC COMMENTS

This bug has been fixed.  Dupicate @throws tags can now be used.
###@###.### 2002-03-29
                                     
2002-03-29



Hardware and Software, Engineered to Work Together