elasticsearch/libs/cli
Ryan Ernst 3e581c66f1
Cleanup Terminal to make it easier to subclass (#86198)
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
2022-04-27 19:06:05 -07:00
..
licenses Move cli sub-project out of server to libs (#31184) 2018-06-07 16:35:34 -04:00
src/main/java/org/elasticsearch/cli Cleanup Terminal to make it easier to subclass (#86198) 2022-04-27 19:06:05 -07:00
build.gradle Update build tools internal dependencies (#82875) 2022-01-24 13:16:38 +01:00