Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16035

Nested AutoCloseables might not all get closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      Subtle problem in HBASE-15891:

      try (A myA = new A(new B()))

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

      try(B myB = new B(); A myA = newA(myB))

      Attachments

        1. HBASE-16035-v1.patch
          2 kB
          Sean Mackrory

        Activity

          People

            mackrorysd Sean Mackrory
            mackrorysd Sean Mackrory
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: