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

Resource leaks found in code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Slider 0.91
    • Slider 0.92
    • other
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: