提交 93c31be1 编写于 作者: C Christoph Kutzinski

[FIXED JENKINS-18351] file descriptor leak while fingerprinting

上级 0e1bc560
......@@ -61,6 +61,9 @@ Upcoming changes</a>
<li class=bug>
“Projects tied to slave” shows unrelated Maven module jobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17451">issue 17451</a>)
<li class=bug>
Fixed file descriptor leak in fingerprint computation.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18351">issue 18351</a>)
<li class=rfe>
Added a new extension point to monitor the flow of stuff in the queue.
<li class=rfe>
......
......@@ -1664,7 +1664,12 @@ public final class FilePath implements Serializable {
return act(new FileCallable<String>() {
private static final long serialVersionUID = 1L;
public String invoke(File f, VirtualChannel channel) throws IOException {
return Util.getDigestOf(new BufferedInputStream(new FileInputStream(f)));
BufferedInputStream source = new BufferedInputStream(new FileInputStream(f));
try {
return Util.getDigestOf(source);
} finally {
source.close();
}
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册