From fc8e6f439a776a408a947be6adf31ecc7a80e738 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Fri, 9 Mar 2018 19:30:52 -0500 Subject: Simplify boolean expressions in groovy Change-Id: I8dc254337f5975c2af6a2de74f20eff919993cf2 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../org/openecomp/mso/bpmn/common/scripts/GenericUtils.groovy | 2 +- .../org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main/groovy/org') 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 { -} +} -- cgit 1.2.3-korg