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 <SP00501638@techmahindra.com>
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(",")){