Bug 48711 - javadoc-warning if derived exception in @throws clause
Summary: javadoc-warning if derived exception in @throws clause
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-14 18:02 EST by Sven Köhler CLA
Modified: 2003-12-16 11:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Köhler CLA 2003-12-14 18:02:30 EST
let's say if the follwoing classes:
class A extends Exception
class B extends B

eclipse 3.0m5 throws a javadoc-warning for the following code:

  /**
   * @throws A if something is wrong
   * @throws B if something is really wrong
   */
  public void method() throws A;

to avoid the warning i have to change the method declaration:
 
  public void method() throws A, B;

although this is unnessary. I would even like to have warning for cases where
the throws-clase can be shortened, e.g. "throws A, B".
Comment 1 Frederic Fusier CLA 2003-12-15 12:09:32 EST
Fixed.

Add possibility to have additional @throws tag on subclasses of declared 
exceptions.

Note that Javadoc still expect explicit @throws tags on declared exceptions 
themselves. This means, based on given example:

class A extends Exception
class B extends B

  /**
   * @throws B if something is really wrong
   */
  public void method() throws A;

compiler will still complain about missing tag for declared exception A, even 
if @throws B tag is now valid...

Test case added in jdt.core.tests.compiler.regression.JavadocTestMixed
Comment 2 David Audel CLA 2003-12-16 11:17:00 EST
Verified of 3.0M6