Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1152

Resource leaks found in code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Slider 0.91
    • Fix Version/s: Slider 0.92
    • Component/s: other
    • Labels:
      None

      Description

      Resource leaks were found in the following files -

      slider-core/src/main/java/org/apache/slider/client/SliderClient.java
      1184    IOUtils.write(keystore, new FileOutputStream(storeFile));
      

      leaked_resource: Failing to save or close resource created by new java.io.FileOutputStream(storeFile) leaks it.

      slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java
      111    InputStream is = new FileInputStream(securityStore.getFile());
      112    return IOUtils.toByteArray(is);
      

      noescape: Resource is is not closed or saved in toByteArray.
      leaked_resource: Variable is going out of scope leaks the resource it refers to.

        Attachments

          Activity

            People

            • Assignee:
              gsaha Gour Saha
              Reporter:
              gsaha Gour Saha
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: