From 06bece2086f54bad060405a211add8e5de2bd1f6 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Tue, 26 Sep 2017 17:09:34 +0530 Subject: Fixed string literal comparision Fix Blocker/Critical sonar issues in so module https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#resolved=false|severities=BLOCKER%2CMAJOR|rules=squid%3AS1132%2Csquid%3AS1143 Move the "true" string literal on the left side of this string comparison Issue-Id: APPC-186 Change-Id: I1a62b36c344ebca1786245e3837a537182c60377 Signed-off-by: shashikanth.vh --- .../org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java index 27a21ecced..7789acee45 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java @@ -784,7 +784,7 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller { String providerNetwork = toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(networkNodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK); - if(providerNetwork != null && providerNetwork.equalsIgnoreCase("true")){ + if("true".equalsIgnoreCase(providerNetwork)){ networkResource.setNeutronNetworkType("PROVIDER"); } else { networkResource.setNeutronNetworkType("BASIC"); -- cgit 1.2.3-korg