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 Availabitlity Release.

To download the current JDK release, click here.
1.4.1 hopperFixed
Related Reports
Duplicate :  
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>
public void <B>test</B>()</PRE>
<DD>A test method.

<DD><CODE>java.lang.IllegalArgumentException</CODE> - If a occurs.</DL>

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

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

(Review ID: 135271) 

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper-beta

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

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