Remove sonar blocker and unused import 65/13465/1
authorPamela Dragosh <pdragosh@research.att.com>
Tue, 19 Sep 2017 13:03:19 +0000 (09:03 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 19 Sep 2017 13:03:26 +0000 (09:03 -0400)
Remove the 3 sonar blockers and unused import in AAI code.

Issue-ID: POLICY-111
Change-Id: I73001a06810ecff3f22da627583a0238c4a09967
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java

index f891a2c..4b5d6c9 100644 (file)
@@ -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");       
                                    }
                                }
index be11942..6b1b624 100644 (file)
  */
 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);