diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2015-07-31 10:45:53 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-08-04 09:06:00 +0000 |
commit | 35a460556ead2bf0b00300da8ce94c7901b31fd4 (patch) | |
tree | 83a04badc69e3a362474adbba064dde11ae54ce3 /src/main/java/com/google/devtools/build/lib/events/Reporter.java | |
parent | e5cf8a9df0dce674314c5a93aecb6c22ba607612 (diff) |
Rollback of commit 2e7a5b47979b2679208a97a65df265be953eb595.
*** Reason for rollback ***
Query performance regression.
--
MOS_MIGRATED_REVID=99560234
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/events/Reporter.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/events/Reporter.java | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/events/Reporter.java b/src/main/java/com/google/devtools/build/lib/events/Reporter.java index a3cf6cce86..e0c39250ba 100644 --- a/src/main/java/com/google/devtools/build/lib/events/Reporter.java +++ b/src/main/java/com/google/devtools/build/lib/events/Reporter.java @@ -25,7 +25,7 @@ import java.util.List; * is not intended as a logging mechanism for developer-only messages; use a * Logger for that. * - * <p>The reporter instance is consumed by the build system, and passes events to + * The reporter instance is consumed by the build system, and passes events to * {@link EventHandler} instances. These handlers are registered via {@link * #addHandler(EventHandler)}. * @@ -42,9 +42,6 @@ public final class Reporter implements EventHandler, ExceptionListener { */ private final OutErr outErrToReporter = outErrForReporter(this); private volatile OutputFilter outputFilter = OutputFilter.OUTPUT_EVERYTHING; - private EventHandler ansiAllowingHandler; - private EventHandler ansiStrippingHandler; - private boolean ansiAllowingHandlerRegistered; public Reporter() {} @@ -146,34 +143,4 @@ public final class Reporter implements EventHandler, ExceptionListener { public void setOutputFilter(OutputFilter outputFilter) { this.outputFilter = outputFilter; } - - /** - * Registers an ANSI-control-code-allowing EventHandler with an ANSI-stripping EventHandler - * that is already registered with the reporter. The ANSI-stripping handler can then be replaced - * with the ANSI-allowing handler by calling {@code #switchToAnsiAllowingHandler} which - * calls {@code removeHandler} for the ANSI-stripping handler and then {@code addHandler} for the - * ANSI-allowing handler. - */ - public synchronized void registerAnsiAllowingHandler( - EventHandler ansiStrippingHandler, - EventHandler ansiAllowingHandler) { - this.ansiAllowingHandler = ansiAllowingHandler; - this.ansiStrippingHandler = ansiStrippingHandler; - ansiAllowingHandlerRegistered = true; - } - - /** - * Restores the ANSI-allowing EventHandler registered using - * {@code #registerAnsiAllowingHandler(...)}. - */ - public synchronized void switchToAnsiAllowingHandler() { - if (ansiAllowingHandlerRegistered) { - removeHandler(ansiStrippingHandler); - addHandler(ansiAllowingHandler); - ansiStrippingHandler = null; - ansiAllowingHandler = null; - ansiAllowingHandlerRegistered = false; - } - } - } |