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: 4525364
Votes 0
Synopsis REGRESSION: javadoc ignores duplicate @throws tag
Category doclet:tbd
Reported Against hopper , merlin-beta3
Release Fixed 1.4.1(hopper)
State 10-Fix Delivered, Verified, bug
Priority: 4-Low
Related Bugs 4649473
Submit Date 09-NOV-2001
Description
This bug has been fixed.  Dupicate @throws tags can now be used.
  xxxxx@xxxxx   2002-03-29

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) 
======================================================================
Work Around
N/A
Evaluation
Need to determine if this is a doclet issue.
  xxxxx@xxxxx   2001-11-13

This bug has been fixed.  Location of fix:

ThrowsTaglet.java

Regression test added:

TestDupThrowsTagsWrapper.sh
  xxxxx@xxxxx   2002-03-29

Verified using TestDupThrowsTagsWrapper.sh
  xxxxx@xxxxx   2002-04-25
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang