Resource leak in hudson.model.FileParameterValue

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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();
      }
      

            Assignee:
            Oleg Nenashev
            Reporter:
            evernat
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: