Skip to content

Commit

Permalink
Remove extra code in allocation commands parsing (#53579)
Browse files Browse the repository at this point in the history
This commit removes some code that is duplicated in the parsing of
allocation commands in the cluster reroute API.
  • Loading branch information
jasontedor committed Mar 14, 2020
1 parent b7dbade commit 66374b6
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ public static AllocationCommands fromXContent(XContentParser parser) throws IOEx
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());
}
Expand Down

0 comments on commit 66374b6

Please sign in to comment.