diff --git a/src/main/java/org/elasticsearch/action/update/UpdateRequest.java b/src/main/java/org/elasticsearch/action/update/UpdateRequest.java index 8b2c704900f..6ddde7f15d8 100644 --- a/src/main/java/org/elasticsearch/action/update/UpdateRequest.java +++ b/src/main/java/org/elasticsearch/action/update/UpdateRequest.java @@ -100,7 +100,7 @@ public class UpdateRequest extends InstanceShardOperationRequest if (script != null && doc != null) { validationException = addValidationError("can't provide both script and doc", validationException); } - if(doc == null && docAsUpsert == true){ + if(doc == null && docAsUpsert){ validationException = addValidationError("can't say to upsert doc without providing doc", validationException); } return validationException;