OpenSearch/client
Gordon Brown e0dbf6e82a
Refactor HLRC RequestConverters parameters to be more explicit (#42128)
The existing `RequestConverters.Params` is confusing, because it wraps
an underlying request object and mutations of the `Params` object
actually mutate the `Request` that was used in the construction of the
`Params`.

This leads to a situation where we create a `RequestConverter.Params`
object, mutate it, and then it appears nothing happens to it - it
appears to be unused. What happens behind the scenes is that the Request
object is mutated when methods on `Params` are invoked. This results in
unclear, confusing code where mutating one object changes another with
no obvious connection.

This commit refactors `RequestConverters.Params` to be a simple helper
class to produce a `Map` which must be passed explicitly to a Request
object. This makes it apparent that the `Params` are actually used, and
that they have an effect on the `request` object explicit and easier to
understand.

Co-authored-by: Ojas Gulati <ojasgulati100@gmail.com>
2019-05-29 17:08:46 -06:00
..
benchmark [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
client-benchmark-noop-api-plugin Cut over SearchResponse and SearchTemplateResponse to Writeable (#41855) 2019-05-22 18:47:54 +02:00
rest Refactor HLRC RequestConverters parameters to be more explicit (#42128) 2019-05-29 17:08:46 -06:00
rest-high-level Refactor HLRC RequestConverters parameters to be more explicit (#42128) 2019-05-29 17:08:46 -06:00
sniffer Upgrade hamcrest to 2.1 (#41464) 2019-04-24 23:40:03 -07:00
test Upgrade hamcrest to 2.1 (#41464) 2019-04-24 23:40:03 -07:00
transport Upgrade hamcrest to 2.1 (#41464) 2019-04-24 23:40:03 -07:00