Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22693

Resource leak in hudson.model.FileParameterValue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Similar Issues:

      Description

      A FileInputStream is not closed in hudson.model.FileParameterValue for "return IOUtils.toByteArray(new FileInputStream(file))".
      This is a resource leak.

      The FileInputStream should be closed, using finally. For example:

      final InputStream input = new FileInputStream(file);
      try {
          return IOUtils.toByteArray(input);
      } finally {
          input.close();
      }
      

        Attachments

          Activity

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              evernat evernat
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: