Community
Participate
Working Groups
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.
Move to JDT/UI
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.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.
.
*** Bug 353010 has been marked as a duplicate of this bug. ***
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.