Fixed string literal comparision issue 95/15495/1
authorshashikanth <shashikanth.vh@huawei.com>
Tue, 26 Sep 2017 12:19:38 +0000 (17:49 +0530)
committershashikanth <shashikanth.vh@huawei.com>
Tue, 26 Sep 2017 12:19:39 +0000 (17:49 +0530)
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 "default" string literal on the left side of this string comparison.

Issue-Id: APPC-186
Change-Id: I5d503e08331a867b2871dee7acfe74112228bf16
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java

index eac76c7..3ba2ae2 100644 (file)
@@ -135,7 +135,7 @@ public class CloudConfig {
                     if (version == null || version.equals(cs.getAic_version())) {
                         return cs;
                     }
-                } else if (cs.getId().equalsIgnoreCase("default")) {
+                } else if ("default".equalsIgnoreCase(cs.getId())) {
                     // save it off in case we need it
                     defaultCloudSite = cs.clone();
                 }