From c0696b9b0ce62d3f10cd46eae8ac5a5ca99d3b1d Mon Sep 17 00:00:00 2001 From: Gaurav Agrawal Date: Tue, 19 Sep 2017 19:06:33 +0530 Subject: Fix critical sonar issues Fix critical sonar issues in CCSDK SLI Northbound by either logging or rethrowing the exception https://sonar.onap.org/component_issues/index?id=org.onap.ccsdk.sli.northbound%3Accsdk-sli-northbound#resolved=false|severities=CRITICAL Change-Id: I718f13b5801ea9d69b5c36f75b5387a0ae59cc6a Issue-Id: CCSDK-67 Signed-off-by: Gaurav Agrawal --- .../java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java | 2 +- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index 91afe1d1a..ec34fe402 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -106,7 +106,7 @@ public class DmaapListener { try { consumerClass = Class.forName(consumerClassName); } catch (Exception e) { - LOG.error("Could not find DMaap consumer class " + consumerClassName); + LOG.error("Could not find DMaap consumer class {}", consumerClassName, e); } if (consumerClass != null) { diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 1754957da..7196c90a7 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -135,7 +135,7 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { LOG.info("POST message body would be:\n"+rpcMsgbody); } } catch (Exception e) { - + LOG.error("Unable to process message", e); } } -- cgit 1.2.3-korg