From a10eb7537d38ac1f259bedf37eb01382a90b69ed Mon Sep 17 00:00:00 2001 From: ezhil Date: Wed, 12 Dec 2018 20:50:23 +0530 Subject: Fixed sonar issue i PolicyFinderServiceImpl.java Fixed major sonar issues Issue-ID: CCSDK-819 Change-Id: I2347aa5f234b33231b7782e6a51d0ba5a1b60dfd Signed-off-by: ezhil --- .../apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ms/neng/src') diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java index b30ac0e6..ce7e3fd5 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java @@ -85,8 +85,7 @@ public class PolicyFinderServiceImpl implements PolicyFinder { GetConfigResponse getConfig(String policyName) throws Exception { GetConfigRequest getConfigRequest = new GetConfigRequest(); getConfigRequest.setPolicyName(policyName); - GetConfigResponse getConfigResponse = makeOutboundCall(getConfigRequest, GetConfigResponse.class); - return getConfigResponse; + return (makeOutboundCall(getConfigRequest, GetConfigResponse.class)); } GetConfigResponse makeOutboundCall(T request, Class response) throws Exception { @@ -97,7 +96,8 @@ public class PolicyFinderServiceImpl implements PolicyFinder { ResponseEntity resp = getRestTemplate().exchange(re, Object.class); if (HttpStatus.OK.equals(resp.getStatusCode())) { ObjectMapper objectmapper = new ObjectMapper(); - System.out.println(objectmapper.writeValueAsString(resp.getBody())); + log.info(objectmapper.writeValueAsString(resp.getBody())); + //System.out.println(objectmapper.writeValueAsString(resp.getBody())); List> respObj = objectmapper.readValue( objectmapper.writeValueAsString(resp.getBody()), new TypeReference>>() {}); -- cgit 1.2.3-korg