diff options
author | 2017-06-01 15:47:19 +0200 | |
---|---|---|
committer | 2017-06-01 18:37:55 +0200 | |
commit | 6b8dd6e7315f7bfdad2b0d660a3df82a07ce07cf (patch) | |
tree | 1287bfb41a349734c995bef2f9e0e3b1ecd0cd54 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | de1eaec83334fa21d6af7cdd5f529223d873ebf0 (diff) |
CountingOutputStream: properly flush()
If console output limiting is enabled in the actual output stream
is wrapped in a CountingOutputStream to hard-limit the number of
bytes written. As on the console, the two streams, stdout and stderr,
might interleave, proper flushing of writes is important. Therefore,
make sure flushing is propagated through the CountingOutputStream.
Change-Id: I591a2a1ae798a9d8ef704118b22960ff9773a59e
PiperOrigin-RevId: 157707049
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java index 091fe5d894..549b1c3416 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java @@ -147,6 +147,16 @@ public class ExperimentalEventHandler implements EventHandler { stream.write(b); } } + + @Override + public void flush() throws IOException { + stream.flush(); + } + + @Override + public void close() throws IOException { + stream.close(); + } } public ExperimentalEventHandler( |