diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/core/MainResponse.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/core/MainResponse.java index 6a7f6b7dd9c..e99fa4d255c 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/core/MainResponse.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/core/MainResponse.java @@ -30,7 +30,7 @@ public class MainResponse { private static final ConstructingObjectParser PARSER = new ConstructingObjectParser<>(MainResponse.class.getName(), true, args -> { - return new MainResponse((String) args[0], (Version) args[1], (String) args[2], (String) args[3], (String) args[4]); + return new MainResponse((String) args[0], (Version) args[1], (String) args[2], (String) args[3]); } ); @@ -39,7 +39,6 @@ public class MainResponse { PARSER.declareObject(ConstructingObjectParser.constructorArg(), Version.PARSER, new ParseField("version")); PARSER.declareString(ConstructingObjectParser.constructorArg(), new ParseField("cluster_name")); PARSER.declareString(ConstructingObjectParser.constructorArg(), new ParseField("cluster_uuid")); - PARSER.declareString(ConstructingObjectParser.constructorArg(), new ParseField("tagline")); } @@ -47,14 +46,12 @@ public class MainResponse { private final Version version; private final String clusterName; private final String clusterUuid; - private final String tagline; - public MainResponse(String nodeName, Version version, String clusterName, String clusterUuid, String tagline) { + public MainResponse(String nodeName, Version version, String clusterName, String clusterUuid) { this.nodeName = nodeName; this.version = version; this.clusterName = clusterName; this.clusterUuid = clusterUuid; - this.tagline = tagline; } public String getNodeName() { @@ -73,10 +70,6 @@ public class MainResponse { return clusterUuid; } - public String getTagline() { - return tagline; - } - public static MainResponse fromXContent(XContentParser parser) { return PARSER.apply(parser, null); } @@ -89,13 +82,12 @@ public class MainResponse { return nodeName.equals(that.nodeName) && version.equals(that.version) && clusterName.equals(that.clusterName) && - clusterUuid.equals(that.clusterUuid) && - tagline.equals(that.tagline); + clusterUuid.equals(that.clusterUuid); } @Override public int hashCode() { - return Objects.hash(nodeName, version, clusterName, clusterUuid, tagline); + return Objects.hash(nodeName, version, clusterName, clusterUuid); } public static class Version { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java index 4bea540a7ce..39cc5b1e36c 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java @@ -167,7 +167,7 @@ public class RestHighLevelClientTests extends ESTestCase { public void testInfo() throws IOException { MainResponse testInfo = new MainResponse("nodeName", new MainResponse.Version("number", "buildType", "buildHash", "buildDate", true, "luceneVersion", "minimumWireCompatibilityVersion", "minimumIndexCompatibilityVersion"), - "clusterName", "clusterUuid", "You Know, for Search"); + "clusterName", "clusterUuid"); mockResponse((ToXContentFragment) (builder, params) -> { // taken from the server side MainResponse builder.field("name", testInfo.getNodeName()); @@ -183,7 +183,6 @@ public class RestHighLevelClientTests extends ESTestCase { .field("minimum_wire_compatibility_version", testInfo.getVersion().getMinimumWireCompatibilityVersion()) .field("minimum_index_compatibility_version", testInfo.getVersion().getMinimumIndexCompatibilityVersion()) .endObject(); - builder.field("tagline", testInfo.getTagline()); return builder; }); MainResponse receivedInfo = restHighLevelClient.info(RequestOptions.DEFAULT); diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/MainResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/MainResponseTests.java index 508441fec06..17515d3d8fa 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/core/MainResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/core/MainResponseTests.java @@ -57,7 +57,6 @@ public class MainResponseTests extends AbstractResponseTestCase response.nodeName = value, new ParseField("name")); PARSER.declareString((response, value) -> response.clusterName = new ClusterName(value), new ParseField("cluster_name")); PARSER.declareString((response, value) -> response.clusterUuid = value, new ParseField("cluster_uuid")); - PARSER.declareString((response, value) -> {}, new ParseField("tagline")); PARSER.declareObject((response, value) -> { final String buildType = (String) value.get("build_type"); response.build = diff --git a/server/src/test/java/org/elasticsearch/action/main/MainResponseTests.java b/server/src/test/java/org/elasticsearch/action/main/MainResponseTests.java index d86c6a4097d..7d8351e1dda 100644 --- a/server/src/test/java/org/elasticsearch/action/main/MainResponseTests.java +++ b/server/src/test/java/org/elasticsearch/action/main/MainResponseTests.java @@ -83,8 +83,7 @@ public class MainResponseTests extends AbstractSerializingTestCase + "\"build_snapshot\":" + current.isSnapshot() + "," + "\"lucene_version\":\"" + version.luceneVersion.toString() + "\"," + "\"minimum_wire_compatibility_version\":\"" + version.minimumCompatibilityVersion().toString() + "\"," - + "\"minimum_index_compatibility_version\":\"" + version.minimumIndexCompatibilityVersion().toString() + "\"}," - + "\"tagline\":\"You Know, for Search\"" + + "\"minimum_index_compatibility_version\":\"" + version.minimumIndexCompatibilityVersion().toString() + "\"}" + "}", Strings.toString(builder)); }