JDK-4525364 : REGRESSION: javadoc ignores duplicate @throws tag
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9,windows_2000
  • CPU: x86,sparc
  • Submitted: 2001-11-09
  • Updated: 2014-05-05
  • Resolved: 2002-04-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.1 hopperFixed
Related Reports
Duplicate :  
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
14-06-2004

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
29-03-2002

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