From 1c0c328b803e93e7e861d7f96039b8050daa49ea Mon Sep 17 00:00:00 2001 From: Oleksandr Moliavko Date: Thu, 10 Oct 2019 14:21:30 +0300 Subject: Removed redundant null check for retryCount to prevent static analyzer warning Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko Change-Id: I9708b89082b56fb7bc24eca577f6a7db75ba79f9 --- .../main/java/org/onap/so/adapters/audit/AuditCreateStackService.java | 2 +- .../main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java | 2 +- .../main/java/org/onap/so/adapters/audit/AuditQueryStackService.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'adapters/mso-openstack-adapters') 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); -- cgit 1.2.3-korg