From 9f2dfd0f577f3ad6bae0b110b89c72267ff6f914 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 3 Sep 2018 15:12:05 +0530 Subject: [PATCH] ConnectionFactory- Fixed sonar issue Fixed sonar code-smells/issues accross this file. Issue-ID: DMAAP-704 Change-Id: Ic3f7d6333f4745176204e436eb2739be63d703e1 Signed-off-by: Arundathi Patil --- .../java/org/onap/dmaap/dbcapi/database/ConnectionFactory.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/onap/dmaap/dbcapi/database/ConnectionFactory.java b/src/main/java/org/onap/dmaap/dbcapi/database/ConnectionFactory.java index 38c063c..aee3ff1 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/database/ConnectionFactory.java +++ b/src/main/java/org/onap/dmaap/dbcapi/database/ConnectionFactory.java @@ -23,12 +23,9 @@ package org.onap.dmaap.dbcapi.database; import java.sql.*; import java.util.*; -import org.apache.log4j.Logger; - import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; -import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum; import org.onap.dmaap.dbcapi.util.DmaapConfig; public class ConnectionFactory { @@ -90,6 +87,10 @@ public class ConnectionFactory { return; } } - try { c.close(); } catch (Exception e) {} + try { + c.close(); + } catch (Exception e) { + logger.error("Error", e); + } } } -- 2.16.6