'continue' or 'break' inside 'finally' block
Reports break
or continue
statements inside of finally
blocks.
While occasionally intended, such statements are very confusing, may mask thrown exceptions, and complicate debugging.
Example:
while (true) {
try {
throwingMethod();
} finally {
continue;
}
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023