brought back the body of the validate() methods. This is still useful if no setter has been invoked.

This commit is contained in:
Martijn van Groningen 2016-01-20 16:02:10 +01:00
parent b0c7096e2f
commit faf9ca2122
2 changed files with 13 additions and 2 deletions

View File

@ -46,7 +46,11 @@ public class GetPipelineRequest extends MasterNodeReadRequest<GetPipelineRequest
@Override
public ActionRequestValidationException validate() {
return null;
ActionRequestValidationException validationException = null;
if (ids == null) {
validationException = addValidationError("ids is missing", validationException);
}
return validationException;
}
@Override

View File

@ -37,7 +37,14 @@ public class PutPipelineRequest extends AcknowledgedRequest<PutPipelineRequest>
@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() {