mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-31 05:25:25 +00:00
[FIXED JENKINS-18351] Better fix for file handle leak.
This commit is contained in:
1 parent
66cc975fba
commit
7f966f6f31
2 files changed
+8
-4
No files matched your search
@@ -1664,11 +1664,11 @@ 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 {
|
||||
BufferedInputStream source = new BufferedInputStream(new FileInputStream(f));
|
||||
FileInputStream is = new FileInputStream(f);
|
||||
try {
|
||||
return Util.getDigestOf(source);
|
||||
return Util.getDigestOf(new BufferedInputStream(is));
|
||||
} finally {
|
||||
source.close();
|
||||
is.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user