mirror of https://github.com/apache/nifi.git
NIFI-7702 This closes #4447. validate requestentity not null
Signed-off-by: Joe Witt <joewitt@apache.org>
This commit is contained in:
parent
0861b2f632
commit
24d4ad348a
|
@ -464,7 +464,7 @@ public class ControllerServiceResource extends ApplicationResource {
|
|||
required = true
|
||||
) final UpdateControllerServiceReferenceRequestEntity requestUpdateReferenceRequest) {
|
||||
|
||||
if (requestUpdateReferenceRequest.getId() == null) {
|
||||
if (requestUpdateReferenceRequest == null || requestUpdateReferenceRequest.getId() == null) {
|
||||
throw new IllegalArgumentException("The controller service identifier must be specified.");
|
||||
}
|
||||
|
||||
|
|
|
@ -283,6 +283,10 @@ public class VersionsResource extends FlowUpdateResource<VersionControlInformati
|
|||
public Response updateVersionControlRequest(@ApiParam("The request ID.") @PathParam("id") final String requestId,
|
||||
@ApiParam(value = "The version control component mapping.", required = true) final VersionControlComponentMappingEntity requestEntity) {
|
||||
|
||||
if (requestEntity == null) {
|
||||
throw new IllegalArgumentException("Version control information must be specified.");
|
||||
}
|
||||
|
||||
// Verify request
|
||||
final RevisionDTO revisionDto = requestEntity.getProcessGroupRevision();
|
||||
if (revisionDto == null) {
|
||||
|
@ -790,6 +794,10 @@ public class VersionsResource extends FlowUpdateResource<VersionControlInformati
|
|||
public Response updateFlowVersion(@ApiParam("The process group id.") @PathParam("id") final String groupId,
|
||||
@ApiParam(value = "The controller service configuration details.", required = true) final VersionedFlowSnapshotEntity requestEntity) {
|
||||
|
||||
if (requestEntity == null) {
|
||||
throw new IllegalArgumentException("Version control information must be specified.");
|
||||
}
|
||||
|
||||
// Verify the request
|
||||
final RevisionDTO revisionDto = requestEntity.getProcessGroupRevision();
|
||||
if (revisionDto == null) {
|
||||
|
|
Loading…
Reference in New Issue