From: shashikanth Date: Thu, 21 Sep 2017 09:48:25 +0000 (+0530) Subject: Removed redundant checks X-Git-Tag: v1.1.0~19^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=1b6903f057c5a020f23a5903daf09dffe454ae10;p=aai%2Ftraversal.git 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 --- 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 32e8cbe4..4b0f24d3 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;