From faf9ca21223bb3cc0a5d800e19d32a5a3c233188 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 20 Jan 2016 16:02:10 +0100 Subject: [PATCH] brought back the body of the validate() methods. This is still useful if no setter has been invoked. --- .../elasticsearch/action/ingest/GetPipelineRequest.java | 6 +++++- .../elasticsearch/action/ingest/PutPipelineRequest.java | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequest.java b/core/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequest.java index 0185a0836b8..34b14ff6164 100644 --- a/core/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequest.java +++ b/core/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequest.java @@ -46,7 +46,11 @@ public class GetPipelineRequest extends MasterNodeReadRequest @Override public ActionRequestValidationException validate() { - return null; + ActionRequestValidationException validationException = null; + if (id == null) { + validationException = addValidationError("id is missing", validationException); + } + if (source == null) { + validationException = addValidationError("source is missing", validationException); + } + return validationException; } public String getId() {