<qhelp>

<overview>

A `finally` block that does not complete normally suppresses any exceptions that may have been thrown in the corresponding `try` block. This can happen if the `finally` block contains any `return` or `throw` statements, or if it contains any `break` or `continue` statements whose jump target lies outside of the `finally` block.

</overview> <recommendation>

To avoid suppressing exceptions that are thrown in a `try` block, design the code so that the corresponding `finally` block always completes normally. Remove any of the following statements that may cause it to terminate abnormally:

- `return`
- `throw`
- `break`
- `continue`

</recommendation> <references>

- J. Bloch and N. Gafter, Java Puzzlers: Traps, Pitfalls, and Corner Cases, Puzzle 36. Addison-Wesley, 2005.
- The Java Language Specification: Execution of try-finally and try-catch-finally.
- Help - Eclipse Platform: Java Compiler Errors/Warnings Preferences.
</references> </qhelp>