Bug 152362 - [save actions][clean up] remove declared exceptions
Summary: [save actions][clean up] remove declared exceptions
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 353010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-31 14:31 EDT by Ricky Ng-Adam CLA
Modified: 2013-03-28 07:04 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricky Ng-Adam CLA 2006-07-31 14:31:40 EDT
I have some code with the following warnings:

"The declared exception ... is not actually thrown by the method ... from type ..."

I'd like to have an option to remove them automatically from the clean up dialog.
Comment 1 Frederic Fusier CLA 2006-08-01 04:54:12 EDT
Move to JDT/UI
Comment 2 Martin Aeschlimann CLA 2006-08-02 13:26:18 EDT
Note that if you do this, you will get errors with callers: Either their catch block is not reached or they have unnecessary exceptions again.
So yes it would be interesting to have such a refactoring, but this is a bit out of scope for us at the moment.
Comment 3 Eclipse Webmaster CLA 2009-08-30 02:34:51 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.
Comment 4 Dani Megert CLA 2011-07-25 10:35:02 EDT
.
Comment 5 Dani Megert CLA 2011-07-25 10:35:57 EDT
*** Bug 353010 has been marked as a duplicate of this bug. ***
Comment 6 Jan W CLA 2013-03-28 07:04:06 EDT
Please add a new wizard that can be called from quick fix too. The wizard should remove the unthrown exceptions and unused catch blocks for all knnown callers and their callers recursivly. The wizard should be callable for the current method and the current exception, but also for all exceptions of this method and for the whole file, i.e. all methods and all exceptions in the current file too.

Maybe there should be only one link in the quick fix and the first page of the wizard should have checkboxes

- current exception (Exception) and method (method) only
- all exceptions of method (method) only
- all exceptions of all methods of class (class)

See bug 320394 for fixing all, too.