AutoRefactor
AutoRefactor copied to clipboard
New refactoring - Remove declared exceptions that are covered my a more generic declared exception
Given
/**
* Does something.
* @throws IOException if something bad happens
* @throws FileNotFoundException if something bad happens
*/
public void doSomething() throws IOException, FileNotFoundException {
// Call some methods that can throw IOException and FileNotFoundException
}
When
automatic refactorings are applied
Then
code should become:
/**
* Does something.
* @throws IOException if something bad happens
*/
public void doSomething() throws IOException, FileNotFoundException {
// Call some methods that can throw IOException and FileNotFoundException
}
Maybe have a look at RemoveUncheckedThrowsClausesRefactoring for a head start.