Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11826

Replace try-finally with try with resources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • Trunk
    • None
    • ALL COMPONENTS
    • None

    Description

      Support for try-with-resources – introduced in Java 7 – allows us to declare resources to be used in a try block with the assurance that the resources will be closed when after the execution of that block.

      To do so, you must open and use the resource within a Java try-with-resources block. When the execution leaves the try-with-resources block, any resource opened within the try-with-resources block is automatically closed, regardless of whether any exceptions are thrown either from inside the try-with-resources block, or when attempting to close the resources.

       

      Attachments

        1. OFBIZ-11826-plugins.patch
          3 kB
          Pawan Verma
        2. OFBIZ-11826.patch
          5 kB
          Pawan Verma

        Issue Links

          Activity

            People

              pawan Pawan Verma
              pawan Pawan Verma
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: