Files
openide/java/java-impl/resources/inspectionDescriptions/FinallyBlockCannotCompleteNormally.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

20 lines
736 B
HTML

<html>
<body>
Reports <code>return</code>, <code>throw</code>, <code>break</code>, <code>continue</code>, and <code>yield</code> statements that are used inside <code>finally</code> blocks.
These cause the <code>finally</code> block to not complete normally but to complete abruptly.
Any exceptions thrown from the <code>try</code> and <code>catch</code> blocks of the same <code>try</code>-<code>catch</code> statement will be suppressed.
<p><b>Example:</b></p>
<pre><code>
void x() {
<b>try</b> {
throw new RuntimeException();
} <b>finally</b> {
// if bar() returns true, the RuntimeException will be suppressed
<b>if</b> (bar()) <b>return</b>;
}
}
</code></pre>
<!-- tooltip end -->
</body>
</html>