Merge pull request #923 from evernat/master

Optimize and close Zip resources in ClassicPluginStrategy and FilePath
This commit is contained in:
Kohsuke Kawaguchi committed 2013-10-27 12:05:23 -07:00
commit f15f49f6f4
2 files changed
+35 -25

No files matched your search

+6 -1
View File
@@ -530,7 +530,12 @@ public final class FilePath implements Serializable {
if (p != null) {
p.mkdirs();
}
IOUtils.copy(zip.getInputStream(e), f);
InputStream input = zip.getInputStream(e);
try {
IOUtils.copy(input, f);
} finally {
input.close();
}
try {
FilePath target = new FilePath(f);
int mode = e.getUnixMode();