Inspectopedia Help

'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

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.14841

Last modified: 12 March 2024