Skip to content

Commit

Permalink
fix typo and make parseIndexConstraints method static in FieldStatsRe…
Browse files Browse the repository at this point in the history
…quest
  • Loading branch information
javanna committed Aug 11, 2016
1 parent 50b31ce commit 2f360ec
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void source(BytesReference content) throws IOException {
break;
case START_OBJECT:
if ("index_constraints".equals(fieldName)) {
parseIndexContraints(indexConstraints, parser);
parseIndexConstraints(indexConstraints, parser);
} else {
throw new IllegalArgumentException("unknown field [" + fieldName + "]");
}
Expand All @@ -117,8 +117,8 @@ public void source(BytesReference content) throws IOException {
this.indexConstraints = indexConstraints.toArray(new IndexConstraint[indexConstraints.size()]);
}

private void parseIndexContraints(List<IndexConstraint> indexConstraints,
XContentParser parser) throws IOException {
private static void parseIndexConstraints(List<IndexConstraint> indexConstraints,
XContentParser parser) throws IOException {
Token token = parser.currentToken();
assert token == Token.START_OBJECT;
String field = null;
Expand Down Expand Up @@ -213,5 +213,4 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(level);
out.writeBoolean(useCache);
}

}

0 comments on commit 2f360ec

Please sign in to comment.