aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/java
diff options
context:
space:
mode:
authorYulian Han <elaine.hanyulian@huawei.com>2018-04-19 11:16:14 +0800
committerYulian Han <elaine.hanyulian@huawei.com>2018-04-19 11:28:07 +0000
commiteac033b710f044bb1eee033527fed61df8001615 (patch)
tree1c498d7609deb34e346f697429b25f7e4a4e0517 /bpmn/MSOInfrastructureBPMN/src/main/java
parente75e31d0d63c3ef9f63f1d81edcef0e47ad8123a (diff)
avoid null exception
Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f064304 Issue-ID: SO-578 Signed-off-by: Yulian Han <elaine.hanyulian@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/java')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java8
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)) {