From ac4e08d6492cced640e27a69cb547701ed3f789c Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 19 Sep 2017 09:03:19 -0400 Subject: Remove sonar blocker and unused import Remove the 3 sonar blockers and unused import in AAI code. Issue-ID: POLICY-111 Change-Id: I73001a06810ecff3f22da627583a0238c4a09967 Signed-off-by: Pamela Dragosh --- .../policy/controlloop/eventmanager/ControlLoopEventManager.java | 6 +++--- .../aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index f891a2c6a..4b5d6c935 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -540,7 +540,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { if (vnfResponse == null) { throw new ControlLoopException("AAI Response is null (query by vnf-id)"); } - if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) { + if (isClosedLoopDisabled(vnfResponse) == true) { throw new ControlLoopException("is-closed-loop-disabled is set to true"); } } else if (event.AAI.get("generic-vnf.vnf-name") != null) { @@ -548,7 +548,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { if (vnfResponse == null) { throw new ControlLoopException("AAI Response is null (query by vnf-name)"); } - if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) { + if (isClosedLoopDisabled(vnfResponse) == true) { throw new ControlLoopException("is-closed-loop-disabled is set to true"); } } else if (event.AAI.get("vserver.vserver-name") != null) { @@ -556,7 +556,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { if (vserverResponse == null) { throw new ControlLoopException("AAI Response is null (query by vserver-name)"); } - if (vserverResponse != null && isClosedLoopDisabled(vserverResponse) == true) { + if (isClosedLoopDisabled(vserverResponse) == true) { throw new ControlLoopException("is-closed-loop-disabled is set to true"); } } diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java index be11942c5..6b1b624ef 100644 --- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java +++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java @@ -19,14 +19,12 @@ */ package org.onap.policy.aai; -import static org.junit.Assert.*; -import java.util.List; -import java.util.LinkedList; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import java.util.LinkedList; import org.junit.Test; import org.onap.policy.aai.util.Serialization; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AAINQResponseTest { private static final Logger logger = LoggerFactory.getLogger(AAINQResponseTest.class); -- cgit 1.2.3-korg