From 2f360ecc168e73d75ac12f8fbce5dfd2ac065648 Mon Sep 17 00:00:00 2001 From: javanna Date: Thu, 11 Aug 2016 20:29:27 +0200 Subject: [PATCH] fix typo and make parseIndexConstraints method static in FieldStatsRequest --- .../elasticsearch/action/fieldstats/FieldStatsRequest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java b/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java index 310af30d25e..d0b40374d6b 100644 --- a/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java +++ b/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java @@ -90,7 +90,7 @@ public class FieldStatsRequest extends BroadcastRequest { break; case START_OBJECT: if ("index_constraints".equals(fieldName)) { - parseIndexContraints(indexConstraints, parser); + parseIndexConstraints(indexConstraints, parser); } else { throw new IllegalArgumentException("unknown field [" + fieldName + "]"); } @@ -117,8 +117,8 @@ public class FieldStatsRequest extends BroadcastRequest { this.indexConstraints = indexConstraints.toArray(new IndexConstraint[indexConstraints.size()]); } - private void parseIndexContraints(List indexConstraints, - XContentParser parser) throws IOException { + private static void parseIndexConstraints(List indexConstraints, + XContentParser parser) throws IOException { Token token = parser.currentToken(); assert token == Token.START_OBJECT; String field = null; @@ -213,5 +213,4 @@ public class FieldStatsRequest extends BroadcastRequest { out.writeString(level); out.writeBoolean(useCache); } - }