diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-10-10 14:21:30 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-10-10 14:21:30 +0300 |
commit | 1c0c328b803e93e7e861d7f96039b8050daa49ea (patch) | |
tree | 010442008b4ddddb630e3ad66c27e16499f656f4 /adapters/mso-openstack-adapters | |
parent | e39c2cbf62f993dbe7843b3eb360c485ef445554 (diff) |
Removed redundant null check for retryCount to
prevent static analyzer warning
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: I9708b89082b56fb7bc24eca577f6a7db75ba79f9
Diffstat (limited to 'adapters/mso-openstack-adapters')
3 files changed, 3 insertions, 3 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java index 54ffc597f4..43b362cbaf 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java @@ -84,7 +84,7 @@ public class AuditCreateStackService extends AbstractAuditService { externalTaskId, getRetrySequence().length); externalTaskService.handleFailure(externalTask, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, getRetrySequence().length, 10000); - } else if (retryCount != null && retryCount - 1 == 0) { + } else if (retryCount == 1) { externalTaskService.complete(externalTask, variables); mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString()); logger.debug("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java index 9a4f154347..da5e8bb3a2 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java @@ -97,7 +97,7 @@ public class AuditDeleteStackService extends AbstractAuditService { externalTaskId, getRetrySequence().length); externalTaskService.handleFailure(externalTask, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, getRetrySequence().length, 10000); - } else if (retryCount != null && retryCount - 1 == 0) { + } else if (retryCount == 1) { externalTaskService.complete(externalTask, variables); mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString()); logger.debug("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java index dc672ff017..8699f8b953 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java @@ -60,7 +60,7 @@ public class AuditQueryStackService extends AbstractAuditService { externalTaskId, getRetrySequence().length); externalTaskService.handleFailure(externalTask, UNABLE_TO_FIND_V_SERVERS_IN_OPENSTACK, UNABLE_TO_FIND_V_SERVERS_IN_OPENSTACK, getRetrySequence().length, 10000); - } else if (retryCount != null && retryCount - 1 == 0) { + } else if (retryCount == 1) { externalTaskService.complete(externalTask, variables); mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString()); logger.debug("The External Task {} Failed. All Retries Exhausted", externalTaskId); |