From a114c57c3f55d7ec520fc7f5dd4be32c3d148289 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Thu, 28 Sep 2017 12:29:16 +0530 Subject: 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 --- src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org') 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 192dcdb91..8f80e07ca 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); -- cgit 1.2.3-korg