You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Sean Mackrory (JIRA)" <ji...@apache.org> on 2016/05/25 19:49:12 UTC

[jira] [Created] (HBASE-15891) Closeable resources potentially not getting closed if exception is thrown

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)