From cb3dc1a40564c6b987c589cbedb536dd9cf51e3a Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Mon, 18 Jun 2018 15:04:26 -0600 Subject: [PATCH] Fix reference to XContentBuilder.string() (#31337) In 6.3 this was moved to `Strings.toString(XContentBuilder)` as part of the XContent extraction. This commit fixes the docs to reference the new method. Resolves #31326 --- docs/java-api/docs/index_.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/java-api/docs/index_.asciidoc b/docs/java-api/docs/index_.asciidoc index b455a7ab01ff3..2ce19cfffa098 100644 --- a/docs/java-api/docs/index_.asciidoc +++ b/docs/java-api/docs/index_.asciidoc @@ -99,11 +99,13 @@ Note that you can also add arrays with `startArray(String)` and other XContentBuilder objects. If you need to see the generated JSON content, you can use the -`string()` method. +`Strings.toString()` method. [source,java] -------------------------------------------------- -String json = builder.string(); +import org.elasticsearch.common.Strings; + +String json = Strings.toString(builder); --------------------------------------------------