Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Static code analysis reports several instances of Closeable resources getting closed outside of 'finally' blocks - so if an Exception is thrown it may not get closed.
ZKUtil.getServerStats CoprocessorClassLoader.init LogLevel.process JarFinder.createJar RpcClientImpl.setupIOstreams
Most of these are straightforward. RpcClientImpl wraps the resource potentially multiple times and the resource needs to remain open after the method returns, so I intend to not fix that. Really, any use of that class should be wrapped in a finally and IT should get closed.