Java
Empty 'finally' block
Warning
Last modified: 03 December 2024 Reports empty finally
blocks.
Empty finally
blocks usually indicate coding errors. They may also remain after code refactoring and can safely be removed.
This inspection doesn't report empty finally
blocks found in JSP files.
Example:
try {
Files.readString(Paths.get("in.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
}
After the quick-fix is applied:
try {
Files.readString(Paths.get("in.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
EmptyFinallyBlock
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?