-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: core
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(); }