File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/main/java/org/elasticsearch/index/query Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,8 @@ public Query toQuery(QueryParseContext parseContext) {
216216 @ Override
217217 public ActionRequestValidationException validate () {
218218 ActionRequestValidationException validationException = null ;
219- if (this .fieldName == null ) {
220- validationException = ValidateActions .addValidationError ("field name cannot be null." , validationException );
221- }
222- if (this .fieldName != null && this .fieldName .isEmpty ()) {
223- validationException = ValidateActions .addValidationError ("field name cannot be empty." , validationException );
219+ if (this .fieldName == null || this .fieldName .isEmpty ()) {
220+ validationException = ValidateActions .addValidationError ("field name cannot be null or empty." , validationException );
224221 }
225222 if (this .value == null ) {
226223 validationException = ValidateActions .addValidationError ("value cannot be null." , validationException );
You can’t perform that action at this time.
0 commit comments