Use a Try-With-Resources Statement to Safely Handle Closeable Resources 

es.uniovi.reflection.analyses.cmu.err54


We detect when local variables that implements java.lang.AutoCloseable are not initialized in a try-with-resources statement, and the code may throw an exception before calling the close method, causing the abrupt termination of the method, or reaching a catch or finally clause where the variable is not closed either. In that case, a try-with-resources statement is advised to the programmer.

Computational Reflection Research Group
12-03-2025 17:14
Reliability
Method Invocation