mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Terminal is the abstraction Elasticsearch uses for all input and output, both character based and binary. In an interactive shell, this is backed by Java's Console, and in non-interactive it is backed by stdin/stdout/stderr. Over time, the Terminal class has been amended to support several different use cases, which has made constructing subclasses for testing or filter based implementations complex. This commit reworks Terminal so that the readers/writers/streams are constructor arguments, instead of overrides. This allows subclasses to simply call super with what is neeeded, rather than overloading several methods and adding the same boilerplate implementation as others. Note that the majority of the modifications here are to tests because MockTerminal now has a factory method instead of direct constructor. relates #85758 |
||
---|---|---|
.. | ||
licenses | ||
src/main/java/org/elasticsearch/cli | ||
build.gradle |