Update ForkingTaskRunner to remove @Deprecated Files method usage

This commit is contained in:
Charles Allen 2014-12-03 13:18:33 -08:00
parent 2681da4420
commit 325a5c4abc
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer
log.info("Logging task %s output to: %s", task.getId(), logFile); log.info("Logging task %s output to: %s", task.getId(), logFile);
boolean runFailed = true; boolean runFailed = true;
try (final OutputStream toLogfile = Files.newOutputStreamSupplier(logFile).getOutput()) { try (final OutputStream toLogfile = Files.asByteSink(logFile).openBufferedStream()) {
ByteStreams.copy(processHolder.process.getInputStream(), toLogfile); ByteStreams.copy(processHolder.process.getInputStream(), toLogfile);
final int statusCode = processHolder.process.waitFor(); final int statusCode = processHolder.process.waitFor();
log.info("Process exited with status[%d] for task: %s", statusCode, task.getId()); log.info("Process exited with status[%d] for task: %s", statusCode, task.getId());