diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java index ccc6a6449f..5fe850ac31 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java @@ -634,6 +634,10 @@ public class FlowResource extends ApplicationResource { required = true ) final ScheduleComponentsEntity requestScheduleComponentsEntity) { + if (requestScheduleComponentsEntity == null) { + throw new IllegalArgumentException("Schedule Component must be specified."); + } + // ensure the same id is being used if (!id.equals(requestScheduleComponentsEntity.getId())) { throw new IllegalArgumentException(String.format("The process group id (%s) in the request body does " @@ -821,6 +825,10 @@ public class FlowResource extends ApplicationResource { @ApiParam(value = "The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered.", required = true) final ActivateControllerServicesEntity requestEntity) { + if (requestEntity == null) { + throw new IllegalArgumentException("Controller service must be specified."); + } + // ensure the same id is being used if (!id.equals(requestEntity.getId())) { throw new IllegalArgumentException(String.format("The process group id (%s) in the request body does " diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterContextResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterContextResource.java index 20fcad42b3..25feace0d9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterContextResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterContextResource.java @@ -328,6 +328,10 @@ public class ParameterContextResource extends ApplicationResource { @PathParam("contextId") final String contextId, @ApiParam(value = "The updated version of the parameter context.", required = true) final ParameterContextEntity requestEntity) { + if (requestEntity == null) { + throw new IllegalArgumentException("Parameter Context must be specified."); + } + // Verify the request final RevisionDTO revisionDto = requestEntity.getRevision(); if (revisionDto == null) { @@ -619,6 +623,10 @@ public class ParameterContextResource extends ApplicationResource { @PathParam("contextId") final String contextId, @ApiParam(value = "The validation request", required=true) final ParameterContextValidationRequestEntity requestEntity) { + if (requestEntity == null) { + throw new IllegalArgumentException("Parameter Context must be specified."); + } + final ParameterContextValidationRequestDTO requestDto = requestEntity.getRequest(); if (requestDto == null) { throw new IllegalArgumentException("Parameter Context must be specified"); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java index 3e16070f33..dadfd69d73 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java @@ -3531,7 +3531,7 @@ public class ProcessGroupResource extends FlowUpdateResource