Back to Intellij Community

ContinueOrBreakFromFinallyBlock

java/java-impl/resources/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html

2025.3-rc-2326 B
Original Source

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;
        }
    }