try {\r
out.close();\r
} finally {\r
- closeSilently(log, out);\r
+ closeSilently(out);\r
}\r
return file;\r
}\r
bis.close();\r
inStream.close();\r
} finally {\r
- closeSilently(log, out);\r
- closeSilently(log, bis);\r
- closeSilently(log, inStream);\r
+ closeSilently(out);\r
+ closeSilently(bis);\r
+ closeSilently(inStream);\r
}\r
return result;\r
}\r
try {\r
contentStr.close();\r
} finally {\r
- closeSilently(log, contentStr);\r
+ closeSilently(contentStr);\r
}\r
return content;\r
}\r
br.close();\r
reader.close();\r
} finally {\r
- closeSilently(log, br);\r
- closeSilently(log, reader);\r
+ closeSilently(br);\r
+ closeSilently(reader);\r
}\r
}\r
return fileStr;\r
bw.close();\r
fwriter.close();\r
} finally {\r
- closeSilently(log, bw);\r
- closeSilently(log, fwriter);\r
+ closeSilently(bw);\r
+ closeSilently(fwriter);\r
}\r
}\r
\r
bw.close();\r
outStream.close();\r
} finally {\r
- closeSilently(log, bw);\r
- closeSilently(log, outStream);\r
+ closeSilently(bw);\r
+ closeSilently(outStream);\r
}\r
}\r
\r
return Arrays.asList(new File(path).list(filter));\r
}\r
\r
- public final static void closeSilently(Logger log, Closeable stream) {\r
- if (stream != null) {\r
- try {\r
- stream.close();\r
- } catch (IOException e) {\r
- log.warning(e.getLocalizedMessage() + " Cause \n"+e.getCause());\r
- }\r
- }\r
- }\r
-\r
\r
public final static void closeSilently(Closeable stream) {\r
if (stream != null) {\r
try {\r
stream.close();\r
} catch (IOException e) {\r
- log.warning(e.getLocalizedMessage()+" Cause \n"+e.getCause());\r
+ System.err.println(e.getLocalizedMessage()+" Cause \n"+e.getCause());\r
}\r
}\r
}\r
+ workDirectory + " for local execution! Ignoring... "\r
+ e.getMessage());\r
} finally {\r
- FileUtil.closeSilently(log, writer);\r
+ FileUtil.closeSilently(writer);\r
}\r
}\r
\r
"Could not load run configuration!" + e.getMessage()+"\n"+\r
e.getCause());\r
} finally {\r
- FileUtil.closeSilently(log, fileInStream);\r
+ FileUtil.closeSilently(fileInStream);\r
}\r
return exec;\r
}\r
+ workDirectory + " for local execution! Ignoring... "
+ e.getMessage());
} finally {
- FileUtil.closeSilently(log, writer);
+ FileUtil.closeSilently(writer);
}
}
"Could not load run configuration!" + e.getMessage(),
e.getCause());
} finally {
- FileUtil.closeSilently(log, fileInStream);
+ FileUtil.closeSilently(fileInStream);
}
return exec;
}
}\r
// hack - we probably lost log messages here.\r
java.util.logging.Logger logger = java.util.logging.Logger.getLogger(this.getClass().getCanonicalName());\r
- FileUtil.closeSilently(logger, errorStream);\r
- FileUtil.closeSilently(logger, outStream);\r
+ FileUtil.closeSilently(errorStream);\r
+ FileUtil.closeSilently(outStream);\r
}\r
return confExec;\r
}\r