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:
Kohsuke Kawaguchi committed 2014-04-19 16:40:10 -07:00
1 parent 9600a0aa0b
commit d1fb126b48
15 files changed
+35 -134

No files matched your search

+4 -16
View File
@@ -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) {