Files
openide/java/java-impl/resources/inspectionDescriptions/EmptyFinallyBlock.html
2025-02-05 04:43:28 +00:00

26 lines
690 B
HTML

<html>
<body>
Reports empty <code>finally</code> blocks.
<p>Empty <code>finally</code> blocks usually indicate coding errors. They may also remain after code refactoring and can safely be removed.</p>
<p>This inspection doesn't report empty <code>finally</code> blocks found in JSP files.</p>
<p><b>Example:</b></p>
<pre><code>
try {
Files.readString(Paths.get("in.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
}
</code></pre>
<p>After the quick-fix is applied:
<pre><code>
try {
Files.readString(Paths.get("in.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
}
</code></pre>
<!-- tooltip end -->
</body>
</html>