catch
sections and suggests splitting them into separate catch
blocks.
Example:
try {
int i = getIndex();
} catch (NullPointerException|IndexOutOfBoundsException e) {
e.printStackTrace();
}
After the quick-fix is applied:
try {
int i = getIndex();
} catch (NullPointerException e) {
e.printStackTrace();
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
This inspection only reports if the language level of the project or module is 7 or higher.