Skip to content

Commit 66374b6

Browse files
committed
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.
1 parent b7dbade commit 66374b6

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/allocation/command/AllocationCommands.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ public static AllocationCommands fromXContent(XContentParser parser) throws IOEx
137137
throw new ElasticsearchParseException("No commands");
138138
}
139139
if (token == XContentParser.Token.FIELD_NAME) {
140-
if (!parser.currentName().equals("commands")) {
141-
throw new ElasticsearchParseException("expected field name to be named [commands], got [{}] instead", parser.currentName());
142-
}
143140
if (!parser.currentName().equals("commands")) {
144141
throw new ElasticsearchParseException("expected field name to be named [commands], got [{}] instead", parser.currentName());
145142
}

0 commit comments

Comments
 (0)