mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-12 07:55:24 +00:00
Testing RestUtils.decodeQueryString("something", "something".indexOf('?') + 1, params); is not really checking decoding of an empty query. Instead, it is testing decoding of "something" as a query (because "something.index('?')+1" evaluates to 0). The parameter map is left empty because "malformed" pairs like "something" are currently skipped. Instead, this change modify this test to check the edge cases: + fromIndex >= queryString.length() + fromIndex < 0