Inspectopedia
 
2024.3

JUnit 3 'super.tearDown()' is not called from 'finally' block

Warning
Reliability
New
Last modified: 03 December 2024

Reports calls of the JUnit 3's super.tearDown() method that are not performed inside a finally block. If an exception is thrown before super.tearDown() is called it could lead to inconsistencies and leaks.

Example:

Improved code: