summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-03-09 19:30:52 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-03-09 19:31:33 -0500
commitfc8e6f439a776a408a947be6adf31ecc7a80e738 (patch)
tree30c4f80fd264caae36e8bba239960eedcb5341ab
parent47e37b67b45911f45fc2a44dffbb40db55367d4b (diff)
Simplify boolean expressions in groovy
Change-Id: I8dc254337f5975c2af6a2de74f20eff919993cf2 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy2
14 files changed, 38 insertions, 38 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy
index 3397aa9b54..baebf794d5 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy
@@ -11,7 +11,7 @@ class GenericUtils extends StringUtils{
return true;
}
for (int i = 0; i < strLen; i++) {
- if (Character.isWhitespace(cs.charAt(i)) == false) {
+ if (!Character.isWhitespace(cs.charAt(i))) {
return false;
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy
index 437d592bb6..9de1708b5b 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy
@@ -725,7 +725,7 @@ class SDNCAdapterUtils {
execution.setVariable(prefix+'sdncResponseSuccess', false)
taskProcessor.utils.log("DEBUG", "Response" + ' = ' + (response == null ? "" : System.lineSeparator()) + response, isDebugLogEnabled)
- if (successIndicator == true){
+ if (successIndicator){
if (response == null || response.trim().equals("")) {
taskProcessor.utils.log("DEBUG", response + ' is empty');
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "SDNCAdapter Workflow Response is Empty")
@@ -842,7 +842,7 @@ class SDNCAdapterUtils {
execution.setVariable(prefix+'sdncResponseSuccess', false)
taskProcessor.utils.log("sdncAdapter Success Indicator is: " + success, isDebugLogEnabled)
- if (success == true) {
+ if (success) {
// we need to look inside the request data for error
def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
@@ -974,4 +974,4 @@ class SDNCAdapterUtils {
-}
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 2b2d62239c..fd9b6d42e8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -233,7 +233,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -250,7 +250,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
utils.log("INFO", msg, isDebugEnabled)
@@ -274,7 +274,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -313,7 +313,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -330,7 +330,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
String aaiService = execution.getVariable("GENGS_service")
if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {
execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
index dfe210ccf6..743eb1a46e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
@@ -178,14 +178,14 @@ public class DoCreateE2EServiceInstanceRollback extends AbstractServiceTaskProce
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean rollbackAAI = execution.getVariable("rollbackAAI")
boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
- if (rollbackAAI == true || rollbackSDNC == true)
+ if (rollbackAAI || rollbackSDNC)
{
execution.setVariable("rolledBack", true)
}
- if (rollbackAAI == true)
+ if (rollbackAAI)
{
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
utils.log("DEBUG","Error deleting service-instance in AAI for rollback", + serviceInstanceId, isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy
index cc34b03c64..ea29de94d7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy
@@ -227,7 +227,7 @@ public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -244,7 +244,7 @@ public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
utils.log("INFO", msg, isDebugEnabled)
@@ -270,7 +270,7 @@ public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -311,7 +311,7 @@ public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -328,7 +328,7 @@ public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
String aaiService = execution.getVariable("GENGS_service")
if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {
execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
index affb932ff4..91ecabcec3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -368,7 +368,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("DEBUG","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -385,7 +385,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
utils.log("DEBUG", msg, isDebugEnabled)
@@ -409,7 +409,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("DEBUG","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -576,7 +576,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("DEBUG","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -593,7 +593,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
else
{
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI == true){
+ if(foundInAAI){
String aaiService = execution.getVariable("GENGS_service")
if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {
execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
index 3c12c0b64a..9a84c6b7b8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
@@ -177,14 +177,14 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean rollbackAAI = execution.getVariable("rollbackAAI")
boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
- if (rollbackAAI == true || rollbackSDNC == true)
+ if (rollbackAAI || rollbackSDNC)
{
execution.setVariable("rolledBack", true)
}
- if (rollbackAAI == true)
+ if (rollbackAAI)
{
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
utils.log("DEBUG","Error deleting service-instance in AAI for rollback", + serviceInstanceId, isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
index 82eea437d0..c5d87d817a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
@@ -181,7 +181,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
utils.log("ERROR", "Exception Occured Processing postProcessCreateVfModuleRollback. Exception is:\n" + e, isDebugLogEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessCreateVfModuleRollback Method:\n" + e.getMessage())
}
- if (rolledBack == false) {
+ if (!rolledBack) {
logDebug("Failure on DoCreateVfModuleRollback", isDebugLogEnabled)
utils.log("ERROR", "Unsuccessful rollback of DoCreateVfModule")
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during rollback of DoCreateVfModule")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index bf61013c76..40e2baab7f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -317,7 +317,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
String serviceType = ""
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
String siData = execution.getVariable("GENGS_service")
@@ -412,7 +412,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
}
}else{
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -446,7 +446,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
msg = "Error deleting Service-instance in AAI" + serviceInstanceId
utils.log("INFO", msg, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index 7de0ed0b02..4c3f6bc73c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -180,7 +180,7 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
String serviceType = ""
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
String siData = execution.getVariable("GENGS_service")
@@ -194,7 +194,7 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
}else{
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -964,7 +964,7 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
msg = "Error deleting Service-instance in AAI" + serviceInstanceId
utils.log("INFO", msg, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index edebc3dbb3..a3407553c8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -273,7 +273,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
NetworkUtils networkUtils = new NetworkUtils()
isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
execution.setVariable(Prefix + "isVfRelationshipExist", isVfRelationshipExist)
- if (isVfRelationshipExist == true) {
+ if (isVfRelationshipExist) {
String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index 1c9b80ac8d..fd4162fa5c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -308,7 +308,7 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
String serviceType = ""
- if(foundInAAI == true){
+ if(foundInAAI){
utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
//Extract GlobalSubscriberId
@@ -409,7 +409,7 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
}
}else{
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
utils.log("DEBUG","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
@@ -443,7 +443,7 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
- if(succInAAI != true){
+ if(!succInAAI){
msg = "Error deleting Service-instance in AAI" + serviceInstanceId
utils.log("DEBUG", msg, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
index c26b14e57c..cac2ad871a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
@@ -222,7 +222,7 @@ public class DoCreateAllottedResourceBRGRollback extends AbstractServiceTaskProc
try {
execution.setVariable("rollbackData", null)
boolean skipRollback = execution.getVariable("skipRollback")
- if (skipRollback != true)
+ if (!skipRollback)
{
execution.setVariable("rolledBack", true)
utils.log("DEBUG","rolledBack", isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
index ff621e5954..08f2df2d09 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
@@ -222,7 +222,7 @@ public class DoCreateAllottedResourceTXCRollback extends AbstractServiceTaskProc
try {
execution.setVariable("rollbackData", null)
boolean skipRollback = execution.getVariable("skipRollback")
- if (skipRollback != true)
+ if (!skipRollback)
{
execution.setVariable("rolledBack", true)
utils.log("DEBUG","rolledBack", isDebugEnabled)