Remove extra code in allocation commands parsing (#53579)
This commit removes some code that is duplicated in the parsing of allocation commands in the cluster reroute API.
This commit is contained in:
parent
b7dbadeea0
commit
66374b61ca
|
@ -137,9 +137,6 @@ public class AllocationCommands implements ToXContentFragment {
|
|||
throw new ElasticsearchParseException("No commands");
|
||||
}
|
||||
if (token == XContentParser.Token.FIELD_NAME) {
|
||||
if (!parser.currentName().equals("commands")) {
|
||||
throw new ElasticsearchParseException("expected field name to be named [commands], got [{}] instead", parser.currentName());
|
||||
}
|
||||
if (!parser.currentName().equals("commands")) {
|
||||
throw new ElasticsearchParseException("expected field name to be named [commands], got [{}] instead", parser.currentName());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue