diff options
author | shashikanth <shashikanth.vh@huawei.com> | 2017-09-26 11:08:08 +0530 |
---|---|---|
committer | shashikanth <shashikanth.vh@huawei.com> | 2017-09-26 11:08:09 +0530 |
commit | 61b4411b0fb21186d385178805b564bb893f5554 (patch) | |
tree | 7f924677410fe5cbc94e68171fc0ce278482c25b | |
parent | 03089c2e6fb0cfb52857ca700e01a53a16dc0ea6 (diff) |
Fixed string literal comparision major issue
https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#fileUuids=AV3BnsdG5bp_wwmIVCEu|resolved=false|severities=MAJOR
Issue-Id:SO-118
Change-Id: I9ce4b3cb4c5acc5d19183dc278e4907aae221443
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
-rw-r--r-- | asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java index 73f37e3f53..bd20eb0bf1 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java @@ -220,7 +220,7 @@ public class VfResourceInstaller implements IVfResourceInstaller { String resourceType = vfResourceStructure.getResourceInstance().getResourceType(); String resourceCategory = vfResourceStructure.getResourceInstance().getCategory(); - if(resourceType.equals("VF")){ + if("VF".equals(resourceType)){ if(resourceCategory.equalsIgnoreCase("Allotted Resource")){ VfResourceInstaller.createAllottedResourceCustomization(vfResourceStructure); @@ -231,7 +231,7 @@ public class VfResourceInstaller implements IVfResourceInstaller { } } - if(resourceType.equals("VL")){ + if("VL".equals(resourceType)){ VfResourceInstaller.createNetworkResourceCustomization(vfResourceStructure); catalogDB.saveNetworkResourceCustomization(vfResourceStructure.getCatalogNetworkResourceCustomization()); } @@ -243,12 +243,12 @@ public class VfResourceInstaller implements IVfResourceInstaller { catalogDB.saveService(vfResourceStructure.getCatalogService()); // Now that the service has been added we can populate the Service_to_AllottedResources table - if(resourceType.equals("VF") && resourceCategory.equalsIgnoreCase("Allotted Resource")){ + if("VF".equals(resourceType) && "Allotted Resource".equalsIgnoreCase(resourceCategory)){ catalogDB.saveServiceToAllottedResources(vfResourceStructure.getCatalogServiceToAllottedResources()); } // Now that the service has been added we can populate the Service_to_Network table - if(resourceType.equals("VL")){ + if("VL".equals(resourceType)){ catalogDB.saveServiceToNetworks(vfResourceStructure.getCatalogServiceToNetworks()); } @@ -667,7 +667,7 @@ public class VfResourceInstaller implements IVfResourceInstaller { // heatTemplate.setAsdcResourceName(vfResourceStructure.getResourceInstance().getResourceName()); heatTemplate.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID()); - List<String> typeList = new ArrayList<String>(); + List<String> typeList = new ArrayList<>(); typeList.add(ASDCConfiguration.HEAT_NESTED); typeList.add(ASDCConfiguration.HEAT_ARTIFACT); @@ -707,7 +707,7 @@ public class VfResourceInstaller implements IVfResourceInstaller { // TODO Set the label // heatEnvironment.setAsdcLabel("Label"); - List<String> typeList = new ArrayList<String>(); + List<String> typeList = new ArrayList<>(); typeList.add(ASDCConfiguration.HEAT); typeList.add(ASDCConfiguration.HEAT_VOL); |