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

[jira] [Created] (HBASE-16035) Nested AutoCloseables might not all get closed

Sean Mackrory created HBASE-16035:
-------------------------------------

             Summary: Nested AutoCloseables might not all get closed
                 Key: HBASE-16035
                 URL: https://issues.apache.org/jira/browse/HBASE-16035
             Project: HBase
          Issue Type: Bug
            Reporter: Sean Mackrory


Subtle problem in HBASE-15891:

{code}try (A myA = new A(new B())){code}

An exception thrown between B starting to open an A finishing initialization may not result in B being closed. A safer syntax would be:

{code}try(B myB = new B(); A myA = newA(myB)){code}



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