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 <shashikanth.vh@huawei.com>
String serviceUuid = sdcCatalogServices.getServiceUuidFromServiceInvariantId(invariantServiceUuid);\r
String resourceUuid = "";\r
if (resourceUuidList != null && !resourceUuidList.isEmpty()) {\r
String serviceUuid = sdcCatalogServices.getServiceUuidFromServiceInvariantId(invariantServiceUuid);\r
String resourceUuid = "";\r
if (resourceUuidList != null && !resourceUuidList.isEmpty()) {\r
- resourceUuid = resourceUuidList.get(0).toString();\r
+ resourceUuid = resourceUuidList.get(0);\r
}\r
/* Invemtory service url is called in this method */\r
isDcaeInfoAvailable = getDcaeInformation(artifactName, serviceUuid, resourceUuid);\r
}\r
/* Invemtory service url is called in this method */\r
isDcaeInfoAvailable = getDcaeInformation(artifactName, serviceUuid, resourceUuid);\r
JSONArray itemsArray = (JSONArray) jsonObj.get("items");\r
JSONObject dcaeServiceType0 = (JSONObject) itemsArray.get(0);\r
daceInventoryResponse = dcaeServiceType0.toString();\r
JSONArray itemsArray = (JSONArray) jsonObj.get("items");\r
JSONObject dcaeServiceType0 = (JSONObject) itemsArray.get(0);\r
daceInventoryResponse = dcaeServiceType0.toString();\r
- logger.info(daceInventoryResponse.toString());\r
+ logger.info(daceInventoryResponse);\r
}\r
LoggingUtils.setTimeContext(startTime, new Date());\r
metricsLogger.info("getDcaeInformation complete: number services returned=" + numServices);\r
}\r
LoggingUtils.setTimeContext(startTime, new Date());\r
metricsLogger.info("getDcaeInformation complete: number services returned=" + numServices);\r