From 461788988cfa8596990fee90bc4968572b1d612f Mon Sep 17 00:00:00 2001 From: Shubhada Ramkrishna Vaze Date: Mon, 23 Oct 2017 16:49:14 +0530 Subject: Sonar Critical Use a logger Use a logger to log this exception Sonar Link: https://sonar.onap.org/component_issues/index?id=org.openecomp.appc%3Aappc#assignees=Shubhada|resolved=false Location: src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java Line No:142 Change-Id: I6d1ce3e3847af7a81496b0a0b4425a11bab24a88 Issue-ID: APPC-290 Signed-off-by: Shubhada Ramkrishna Vaze --- .../src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java index d9fd2a4a1..268a7f29a 100644 --- a/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java +++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java @@ -139,7 +139,7 @@ public class SdcCallback implements INotificationCallback { cleanShutdown = executor.awaitTermination(waitSec, TimeUnit.SECONDS); executor.shutdownNow(); // In case of timeout } catch (InterruptedException e) { - e.printStackTrace(); + logger.error("Error in SdcCallback for stop(int waitSec) method due to InterruptedException: reason= " + e.getMessage(), e); } logger.info(String.format("Attempting to shutdown cleanly: %s", cleanShutdown ? "SUCCESS" : "FAILURE")); logger.info("Shutdown complete."); -- cgit 1.2.3-korg