Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
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(); }
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/model/FileParameterValue.java
http://jenkins-ci.org/commit/jenkins/eb9cbead0b117e0544871d17e7077e7837a60bb7
Log:
[FIXED JENKINS-22693] - Properly close InputStreams in FileParameterValue
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
(cherry picked from commit 8767ddb192cf752c7d28f512884b9ecd3b9cdbd4)