Detecting and handling third-party library filehandle leaks in Java
- by tucuxi
Is there any way to detect and handle whether a Java library is correctly releasing file-handles (via "close") from within a Java program that is using said library, short of having access to the actual library code and inserting the corresponding "finally close" statements?
If detection is feasible, is there any way to close those file-handles without a reference to the Reader (or FileInputStream) that was reading the file?