From 1b6903f057c5a020f23a5903daf09dffe454ae10 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Thu, 21 Sep 2017 15:18:25 +0530 Subject: Removed redundant checks Fix Major sonar issues in aai/traversal module https://sonar.onap.org/component_issues?id=org.onap.aai.traversal%3Atraversal#resolved=false|severities=BLOCKER Change this condition so that it does not always evaluate to "true" Issue-Id:AAI-212 Change-Id: I64659f0afc1cc497f31cf726a8c29b8bdf849a49 Signed-off-by: shashikanth.vh --- .../src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java index 32e8cbe..4b0f24d 100644 --- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java +++ b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java @@ -942,10 +942,8 @@ public class SearchGraph { invItemList.add(invItem); } } - if (invItemList != null) { - inventoryItems.set("inventoryResponseItem", invItemList); - inventoryItem.set("inventoryResponseItems", inventoryItems); - } + inventoryItems.set("inventoryResponseItem", invItemList); + inventoryItem.set("inventoryResponseItems", inventoryItems); } } return inventoryItem; -- cgit 1.2.3-korg