From 1a8ff6f2c203297eae2fa65942ca4757a201a830 Mon Sep 17 00:00:00 2001 From: SP00501638 Date: Mon, 12 Mar 2018 11:12:40 +0530 Subject: Sonar Major Move the null string literal on the left side of this string comparison CreateFirewallController.java:L347 Sonar Link: https://sonar.onap.org/project/issues?id=org.onap.policy.engine%3APolicyEngineSuite&myIssues=true&open=AWBFphN0-08if2a6vI7H&resolved=false&severities=MAJOR Location: POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java Change-Id: I744a66f3622fb7db0933c7c7dabc520e859cff4d Issue-ID: POLICY-685 Signed-off-by: SP00501638 --- .../main/java/org/onap/policy/controller/CreateFirewallController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'POLICY-SDK-APP/src/main') diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java index 7001aa9a8..3e24dc7c4 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java @@ -344,7 +344,7 @@ public class CreateFirewallController extends RestrictedBaseController { jpaTermList = (TermList) tmList.get(0); if (jpaTermList != null){ ruleSrcList= jpaTermList.getSrcIPList(); - if ((ruleSrcList!= null) && (!ruleSrcList.isEmpty()) && !ruleSrcList.equals("null")){ + if ((ruleSrcList!= null) && (!ruleSrcList.isEmpty()) && !"null".equals(ruleSrcList)){ displayString.append("Source IP List: " + jpaTermList.getSrcIPList()); displayString.append(" ; \t\n"); for(String srcList:ruleSrcList.split(",")){ -- cgit 1.2.3-korg