diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2018-04-20 01:50:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-20 01:50:33 +0000 |
commit | ebd7de2772445e6c9a486ea801728860b88dfe43 (patch) | |
tree | cfb80c0549c6d4303f2e7cd846523ee74ed2ed3c /bpmn/MSOInfrastructureBPMN/src/main | |
parent | c48052c5351b3e7982ca2d82032b693b3e9f663d (diff) | |
parent | eac033b710f044bb1eee033527fed61df8001615 (diff) |
Merge "avoid null exception"
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java index de50fe11b5..09561a620e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java @@ -110,7 +110,7 @@ public abstract class AbstractBuilder<IN, OUT> { protected String getRequestActoin(DelegateExecution execution) { String action = /*RequestInformation.*/RequestAction.CreateNetworkInstance.getName(); String operType = (String) execution.getVariable(OPERATION_TYPE); - String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase(); + String resourceType = (String)execution.getVariable(RESOURCE_TYPE); if (!StringUtils.isBlank(operType)) { if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { @@ -134,17 +134,17 @@ public abstract class AbstractBuilder<IN, OUT> { } private boolean isOverlay(String resourceType) { - return !StringUtils.isBlank(resourceType) && resourceType.contains("overlay"); + return !StringUtils.isBlank(resourceType) && resourceType.toLowerCase().contains("overlay"); } private boolean isUnderlay(String resourceType) { - return !StringUtils.isBlank(resourceType) && resourceType.contains("underlay"); + return !StringUtils.isBlank(resourceType) && resourceType.toLowerCase().contains("underlay"); } protected String getSvcAction(DelegateExecution execution) { String action = /*SdncRequestHeader.*/SvcAction.Create.getName(); String operType = (String) execution.getVariable(OPERATION_TYPE); - String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase(); + String resourceType = (String)execution.getVariable(RESOURCE_TYPE); if (!StringUtils.isBlank(operType)) { if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { |