Bug 49163 - addition to compiler option 'Unnecessary declaration of thrown checked exception'
Summary: addition to compiler option 'Unnecessary declaration of thrown checked except...
Status: RESOLVED DUPLICATE of bug 44876
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-18 22:01 EST by Alvin Thompson CLA
Modified: 2004-02-13 07:14 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 Alvin Thompson CLA 2003-12-18 22:01:14 EST
please add the same two checkboxes that are under 'Parameter is never read'
* check when overriding concrete method
* check when implementing abstract method

that last one is really driving me nuts, as when implementing an interface its
common to not throw the exception.

BTW, this product doesn't suck.
Comment 1 Dirk Baeumer CLA 2003-12-21 11:30:12 EST
Needs some compiler support first.
Comment 2 Philipe Mulet CLA 2003-12-22 06:25:52 EST
We will add support for this scenario, in a combined option:
- check when overriding method

(taking care of the concrete and abstract scenario)

Comment 3 Sebastian Dietrich CLA 2004-02-05 10:58:38 EST
I'm not sure if Alvin ment the same but I experience trouble when a method 
(declaring an unnecessary throws) is overwritten by another method (this time 
the throws is necessary).
Removing the first throws of course leads to a compile error
Comment 4 Philipe Mulet CLA 2004-02-13 07:14:59 EST
This is enforced by the language spec, and this is why we added the extra 
control to tolerate unused exceptions in overriding methods, ad further 
subclasses may require these. It is not solving all cases, but most of them, in 
a non-expensive way. 

Also see comments in bug 44876

*** This bug has been marked as a duplicate of 44876 ***