JDK-4649473 : Subsequent use of @throws for a particular exception are ignored.
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2002-03-08
  • Updated: 2014-05-05
  • Resolved: 2002-03-08
Related Reports
Duplicate :  
Description
Consider the following testcase
===============================
public class test
{
        /**
         *      Just to check whether all reasons for NullPointerException are documented.
         *      @throws NullPointerException for ReasonNo.1
         *      @throws NullPointerException for ReasonNo.2
         *      @throws ArithmeticException for ReasonNo.3
         *      @throws NullPointerException for ReasonNo.4
         */
        public void methodOne () throws NullPointerException, ArithmeticException
        {
        }
}


The Same Exception is documentd 3 times for various reasons, (one important being to increase readability of source files) and the Javadoc tool documents
only the first instance... 

Read below for the output by std.doclet,
=====================================================================
methodOne

public void methodOne()
               throws java.lang.NullPointerException,
                      java.lang.ArithmeticException

      Just to check whether all reasons for NullPointerException are documented. 

      Throws: 
            java.lang.NullPointerException - for ReasonNo.1 
            java.lang.ArithmeticException - for ReasonNo.3
==============================================================================

This behaviour is not documented, but highly desired. 

Comments
EVALUATION This is one of many duplicates of 4525364 "javadoc ignores duplicate @throws tags (regression). Closing out as a dupe. ###@###.### 2002-03-08
08-03-2002