mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
Massaging the fix by stevenpost
- coding style was not matching the rest of Jenkins - IOUtils.closeQuietly is a lot more concise way of achieving the same thing. - AtomicFileWriter.abort() does close, so no need to close it one more time.
This commit is contained in:
1 parent
9600a0aa0b
commit
d1fb126b48
15 files changed
+35
-134
No files matched your search
@@ -156,14 +156,8 @@ public class Main {
|
||||
ret = proc.join();
|
||||
|
||||
w.write("</log><result>"+ret+"</result><duration>"+(System.currentTimeMillis()-start)+"</duration></run>");
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
w.close();
|
||||
}
|
||||
catch (IOException ioe) {
|
||||
// swallow exception
|
||||
}
|
||||
} finally {
|
||||
IOUtils.closeQuietly(w);
|
||||
}
|
||||
|
||||
String location = home+"job/"+projectNameEnc+"/postBuildResult";
|
||||
@@ -183,14 +177,8 @@ public class Main {
|
||||
FileInputStream in = new FileInputStream(tmpFile);
|
||||
try {
|
||||
Util.copyStream(in,con.getOutputStream());
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
in.close();
|
||||
}
|
||||
catch (IOException ioe) {
|
||||
// swallow exception
|
||||
}
|
||||
} finally {
|
||||
IOUtils.closeQuietly(in);
|
||||
}
|
||||
|
||||
if(con.getResponseCode()!=200) {
|
||||
|
||||
Reference in new issue
Block a user