From: shashikanth Date: Thu, 28 Sep 2017 06:59:16 +0000 (+0530) Subject: Fixed major sonar issues X-Git-Tag: v1.1.0~41^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=clamp.git;a=commitdiff_plain;h=a114c57c3f55d7ec520fc7f5dd4be32c3d148289 Fixed major sonar issues Fix major sonar issues in clamp module https://sonar.onap.org/component_issues?id=org.onap.clamp%3Aclds#resolved=false|severities=MAJOR|rules=squid%3AS1132%2Csquid%3AS1858 "get" returns a string, there's no need to call "toString()". Issue-Id:CLAMP-54 Change-Id: I36cadab8e60122e1b4e244768d345cf04568d134 Signed-off-by: shashikanth.vh --- diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java index 192dcdb9..8f80e07c 100644 --- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java +++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java @@ -101,7 +101,7 @@ public class DcaeInventoryServices { String serviceUuid = sdcCatalogServices.getServiceUuidFromServiceInvariantId(invariantServiceUuid); String resourceUuid = ""; if (resourceUuidList != null && !resourceUuidList.isEmpty()) { - resourceUuid = resourceUuidList.get(0).toString(); + resourceUuid = resourceUuidList.get(0); } /* Invemtory service url is called in this method */ isDcaeInfoAvailable = getDcaeInformation(artifactName, serviceUuid, resourceUuid); @@ -215,7 +215,7 @@ public class DcaeInventoryServices { JSONArray itemsArray = (JSONArray) jsonObj.get("items"); JSONObject dcaeServiceType0 = (JSONObject) itemsArray.get(0); daceInventoryResponse = dcaeServiceType0.toString(); - logger.info(daceInventoryResponse.toString()); + logger.info(daceInventoryResponse); } LoggingUtils.setTimeContext(startTime, new Date()); metricsLogger.info("getDcaeInformation complete: number services returned=" + numServices);