Sean Mackrory created HBASE-15891:
-------------------------------------

             Summary: Closeable resources potentially not getting closed if 
exception is thrown
                 Key: HBASE-15891
                 URL: https://issues.apache.org/jira/browse/HBASE-15891
             Project: HBase
          Issue Type: Bug
            Reporter: Sean Mackrory
            Priority: Minor


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.
{code}
ZKUtil.getServerStats
CoprocessorClassLoader.init
LogLevel.process
JarFinder.createJar
RpcClientImpl.setupIOstreams
{code}
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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to