In 6.3 XContentBuilder.string() is removed.
It was not deprecated in 6.2.4
Also, it is still mentioned in the documentation.
thanks for opening this issue @brackxm could you point us at where in the docs we use the removed method? We test docs snippets nowadays so if some code doesn't compile we should have caught it.
On deprecating, we consider this an internal API, are you using it from a plugin? See #28972 for the PR where this was changed, the replacement is Strings.toString(XContentBuilder)
. We don't generally go through deprecation for this type of changes, as the java compiler helps users finding out where they have to adapt their code. cc @dakrone
Pinging @elastic/es-core-infra
Thanks for providing the replacement.
The compiler does help in finding the problem, not in providing a solution.
A deprecation with comment with the replacement would have helped.
I would not consider an method mentioned in the documentation internal.
It is mentioned here
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-index.html
@brackxm thanks for the link, I didn't realize we used this method in the documentation. I'll open a PR to fix it.
Most helpful comment
Thanks for providing the replacement.
The compiler does help in finding the problem, not in providing a solution.
A deprecation with comment with the replacement would have helped.
I would not consider an method mentioned in the documentation internal.
It is mentioned here
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-index.html