From deac6fe2a23859c5cf9cf8c828045af5eff78868 Mon Sep 17 00:00:00 2001 From: "Agarwal, Ruchira (ra1926)" Date: Tue, 5 Nov 2019 19:50:30 +0000 Subject: minor updates to clean up code clean up code to sync with internal Issue-ID: CCSDK-1873 Signed-off-by: Agarwal, Ruchira (ra1926) Change-Id: I1043e3f34176aebf2531bf0581b207694264d6f2 --- .../onap/ccsdk/sli/core/dblib/config/DbConfigPool.java | 11 +++++++++-- .../org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'dblib/provider/src') diff --git a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java index 6cb1d9c3..ea7b3fdc 100644 --- a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java @@ -27,14 +27,21 @@ import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @version $Revision: 1.15 $ + * Change Log + * Author Date Comments + * ============== ======== ==================================================== + * Rich Tabedzki + */ public class DbConfigPool { - private static Logger log = LoggerFactory.getLogger(DbConfigPool.class); + private static final Logger LOGGER = LoggerFactory.getLogger(DbConfigPool.class); private final String type; private static final int timeOut=0; private ArrayList configurations = new ArrayList<>(); public DbConfigPool(Properties properties) { - log.debug("Initializing DbConfigType"); + LOGGER.debug("Initializing DbConfigType"); type = properties.getProperty(BaseDBConfiguration.DATABASE_TYPE, "JDBC").toUpperCase(); } diff --git a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java index 454af02b..f6625067 100644 --- a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java @@ -34,9 +34,16 @@ import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @version $Revision: 1.15 $ + * Change Log + * Author Date Comments + * ============== ======== ==================================================== + * Rich Tabedzki + */ public class PollingWorker implements Runnable { - private Logger logger = LoggerFactory.getLogger(PollingWorker.class); + private static final Logger LOGGER = LoggerFactory.getLogger(PollingWorker.class); private static PollingWorker self = null; @@ -116,7 +123,7 @@ public class PollingWorker implements Runnable { consume((TestSample) next); } else { System.out.println(next.getClass().getName()); - logger.error(next.getClass().getName()); + LOGGER.error(next.getClass().getName()); } } try { @@ -152,7 +159,7 @@ public class PollingWorker implements Runnable { } sb.append(tmp2[i].get()).append("\t"); } - logger.info(sb.toString()); + LOGGER.info(sb.toString()); } class MyTimerTask extends TimerTask { @@ -191,8 +198,8 @@ public class PollingWorker implements Runnable { } /** - * @author Rich Tabedzki A helper class to pass measured parameter to the - * counter. + * @author Rich Tabedzki + * A helper class to pass measured parameter to the counter. */ static class TestSample implements Comparable { private long starttime; -- cgit 1.2.3-korg