From 2ccdd188674b7fe85df61a8978257b7b5f7b1eea Mon Sep 17 00:00:00 2001 From: ezhil Date: Wed, 12 Dec 2018 22:21:25 +0530 Subject: Fixed sonar issues in SpringServiceImpl.java Logged exceptions Issue-ID: CCSDK-818 Change-Id: I90fc2d9c8d7e2627fc2c1f80628a9f4a0e7531da Signed-off-by: ezhil --- .../org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ms/neng') diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java index c5cabe51..347a2393 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java @@ -135,7 +135,7 @@ public class SpringServiceImpl implements SpringService { if (e instanceof NengException) { throw e; } else { - e.printStackTrace(); + log.warning(e.getMessage()); throw new Exception("Internal error occurred while processing the request"); } } @@ -149,6 +149,7 @@ public class SpringServiceImpl implements SpringService { try { return policyDetailsRepository.findPolicyResponseByName(policyName); } catch (Exception e) { + log.warning(e.getMessage()); return new PolicyDetails(); } } @@ -190,7 +191,7 @@ public class SpringServiceImpl implements SpringService { if (e instanceof NengException) { throw e; } else { - e.printStackTrace(); + log.warning(e.getMessage()); throw new Exception("Internal error occurred while processing the request"); } } -- cgit 1.2.3-korg