aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav Agrawal <gaurav.agrawal@huawei.com>2017-09-19 19:06:33 +0530
committerGaurav Agrawal <gaurav.agrawal@huawei.com>2017-09-19 19:11:22 +0530
commitc0696b9b0ce62d3f10cd46eae8ac5a5ca99d3b1d (patch)
tree9cae579f6bad3f365035ebb04f8bda4e3b17cf84
parent298d795205068f9ba7ce548a09bec474b8375270 (diff)
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 <gaurav.agrawal@huawei.com>
-rw-r--r--asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java3
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java2
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java2
-rw-r--r--ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java2
-rw-r--r--ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java4
5 files changed, 6 insertions, 7 deletions
diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
index b9c897ec..cebcb998 100644
--- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
+++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
@@ -157,8 +157,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService {
LOG.info("Create Containers succeeded!: ");
} catch (InterruptedException | ExecutionException e) {
- LOG.error("Create Containers Failed: " + e);
- e.printStackTrace();
+ LOG.error("Create Containers Failed: ", e);
}
} else {
LOG.warn("createContainers : cannot find dataBroker to create containers");
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 91afe1d1..ec34fe40 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 1754957d..7196c90a 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);
}
}
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java
index dd9437ce..9b36cb6b 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java
@@ -66,7 +66,7 @@ public class SdncArtifactMap {
try {
this.pass = Integer.parseInt(pass);
} catch (Exception e) {
- LOG.error("Invalid pass value for artifact map entry ("+tag+","+rpc+","+pass+")");
+ LOG.error("Invalid pass value for artifact map entry ({} {} {})", tag, rpc, pass, e);
}
}
}
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
index 3c561118..3ea092d4 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
@@ -132,7 +132,7 @@ public class SdncUebConfiguration implements IConfiguration{
try {
pollingInterval = Integer.parseInt(curval);
} catch (Exception e) {
- LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-interval ("+curval+")");
+ LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-interval ({}) ", curval, e);
}
}
@@ -141,7 +141,7 @@ public class SdncUebConfiguration implements IConfiguration{
try {
pollingTimeout = Integer.parseInt(curval);
} catch (Exception e) {
- LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-timeout ("+curval+")");
+ LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-timeout ({}) ", curval, e);
}
}