Fixed string literal comparision 81/15481/2
authorshashikanth <shashikanth.vh@huawei.com>
Tue, 26 Sep 2017 11:45:00 +0000 (17:15 +0530)
committerShashikanth VH <shashikanth.vh@huawei.com>
Wed, 27 Sep 2017 05:04:49 +0000 (05:04 +0000)
Fix major 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: I1223f769c06673b9b4817f2cd3965b6bf429f0ef
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCController.java

index 3ca8527..22c4b04 100644 (file)
@@ -442,7 +442,7 @@ public class ASDCController {
         try {\r
                String resourceType = resourceStructure.getResourceInstance().getResourceType();\r
                String category = resourceStructure.getResourceInstance().getCategory();\r
-               if(resourceType.equals("VF") && !category.equalsIgnoreCase("Allotted Resource")){\r
+               if("VF".equals(resourceType) && !"Allotted Resource".equalsIgnoreCase(category)){\r
                        resourceStructure.createVfModuleStructures();\r
                }\r
                //resourceInstaller.installTheResource (resourceStructure);\r