From afb592cc11f39dc4a3bbf3a7e97013d4017c80c2 Mon Sep 17 00:00:00 2001 From: Artem Prigoda Date: Tue, 19 Oct 2021 13:41:18 +0200 Subject: [PATCH] Remove else block with the IllegalStateException --- .../action/admin/cluster/health/ClusterHealthResponse.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java index 164f48f07a42d..611e2a1513dbd 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java @@ -306,8 +306,6 @@ public void writeTo(StreamOutput out) throws IOException { out.writeTimeValue(taskMaxWaitingTime); if (out.getVersion().onOrAfter(Version.V_7_16_0)) { out.writeBoolean(return200ForClusterHealthTimeout); - } else if (return200ForClusterHealthTimeout) { - throw new IllegalArgumentException("Can't fix response code in a cluster involving nodes with version " + out.getVersion()); } }