Skip to content

Commit 2f360ec

Browse files
committed
fix typo and make parseIndexConstraints method static in FieldStatsRequest
1 parent 50b31ce commit 2f360ec

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void source(BytesReference content) throws IOException {
9090
break;
9191
case START_OBJECT:
9292
if ("index_constraints".equals(fieldName)) {
93-
parseIndexContraints(indexConstraints, parser);
93+
parseIndexConstraints(indexConstraints, parser);
9494
} else {
9595
throw new IllegalArgumentException("unknown field [" + fieldName + "]");
9696
}
@@ -117,8 +117,8 @@ public void source(BytesReference content) throws IOException {
117117
this.indexConstraints = indexConstraints.toArray(new IndexConstraint[indexConstraints.size()]);
118118
}
119119

120-
private void parseIndexContraints(List<IndexConstraint> indexConstraints,
121-
XContentParser parser) throws IOException {
120+
private static void parseIndexConstraints(List<IndexConstraint> indexConstraints,
121+
XContentParser parser) throws IOException {
122122
Token token = parser.currentToken();
123123
assert token == Token.START_OBJECT;
124124
String field = null;
@@ -213,5 +213,4 @@ public void writeTo(StreamOutput out) throws IOException {
213213
out.writeString(level);
214214
out.writeBoolean(useCache);
215215
}
216-
217216
}

0 commit comments

Comments
 (0)