opensearch-project / opensearch-java

Java Client for OpenSearch
Apache License 2.0
106 stars 169 forks source link

[BUG] Avoid reflection in pathEncode #1008

Open dblock opened 1 month ago

dblock commented 1 month ago

What is the bug?

In https://github.com/opensearch-project/opensearch-java/pull/999 we are using reflection to call pathEncode from the right library. There be dragons.

What is the expected behavior?

Do not use reflection.

Alternatives attempted were to use a common library. A better approach is likely to change the class hierarchy so that the active transport library is doing the encoding.