aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-02-19 15:03:41 +0100
committerRobert Bogacki <r.bogacki@samsung.com>2019-02-20 14:00:20 +0000
commit33e33dc04125cd320a870b567a51c48525ccad0f (patch)
tree498732d0efcdaeb67d678c36036c47245003f3be /bpmn/so-bpmn-tasks/src/main
parent20a24c8e780890d4e63b281e5de16080d322bf17 (diff)
Fixed possible NPE in WorkflowAction
NullPointerException could be thrown in case when resource == null. Change-Id: I1f78e4733187f3086ac1915d2bfb098fb8c4aabd Issue-ID: SO-1530 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 99bda80e4f..8a3a778b06 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -1050,9 +1050,11 @@ public class WorkflowAction {
executeBuildingBlock.setRequestDetails(requestDetails);
if(isConfiguration){
ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys();
- configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId());
- configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId());
- configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId());
+ if (resource != null){
+ configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId());
+ configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId());
+ configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId());
+ }
executeBuildingBlock.setConfigurationResourceKeys(configurationResourceKeys);
}
return executeBuildingBlock;