sonar Major issues 71/30371/1
authorSnigdha Sucharita Patra <sp00503415@techmahindra.com>
Tue, 6 Feb 2018 05:14:15 +0000 (10:44 +0530)
committerSnigdha Sucharita Patra <sp00503415@techmahindra.com>
Tue, 6 Feb 2018 05:14:15 +0000 (10:44 +0530)
Replace these toUpperCase()/toLowerCase() and equals() calls with a single equalsIgnoreCase() call
Sonar Link:
https://sonar.onap.org/component_issues?id=org.onap.dcaegen2.platform%3Ainventory-api#resolved=false|severities=MAJOR|assignees=Snigdha503415
Location:
src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
Line No-93

Change-Id: I5d7ec72053255053ebf2c0a434cb8461a703f299
Issue-ID: DCAEGEN2-306
Signed-off-by: Snigdha Sucharita Patra <sp00503415@techmahindra.com>
src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java

index bc1888f..90c2435 100644 (file)
@@ -90,7 +90,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService {
             // TODO: When putting together the components fail. Should this be a 500 case?
             // For now, this is just logged as a warning.
 
-            if (COMPONENT_SOURCE_DCAE_CONTROLLER.equals(sco.getComponentSource().toUpperCase(Locale.ENGLISH))) {
+            if (COMPONENT_SOURCE_DCAE_CONTROLLER.equalsIgnoreCase(sco.getComponentSource())) {
                 if (this.dcaeControllerClient != null) {
                     try {
                         DCAEControllerClient.ServiceInstance serviceInstance