From 263950413073f5d1d7af3d2854052af8ec41d281 Mon Sep 17 00:00:00 2001 From: "prakash.e" Date: Thu, 21 Dec 2017 16:52:36 +0530 Subject: Removal of unused private field Change-Id: Ie2d33f7f9dba20a4d0fdf6a33f8574e953633a69 Issue-ID: CCSDK-151 Signed-off-by: prakash.e --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java | 5 +---- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index a51ea7c88..a9f5fedad 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -35,7 +35,6 @@ public abstract class SdncDmaapConsumer implements Runnable { private static final Logger LOG = LoggerFactory .getLogger(SdncDmaapConsumer.class); - private String propertiesPath = ""; private Properties properties = null; private MRConsumer consumer = null; private MRConsumerResponse consumerResponse = null; @@ -62,13 +61,11 @@ public abstract class SdncDmaapConsumer implements Runnable { } public String getProperty(String name) { - return (properties.getProperty(name, "")); + return properties.getProperty(name, ""); } public void init(Properties properties, String propertiesPath) { - this.propertiesPath = propertiesPath; - try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { LOG.debug("propertiesPath: " + propertiesPath); 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 1d499a1e7..ce65e783e 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 @@ -124,6 +124,8 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { private Map loadMap(String msgType, String mapDirName) { Map results = new HashMap<>(); + String dirName = mapDirName; + if (mapDirName == null) { String rootdir = System.getenv(DMAAPLISTENERROOT); @@ -131,10 +133,10 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { rootdir = "/opt/app/dmaap-listener"; } - mapDirName = rootdir + "/lib"; + dirName = rootdir + "/lib"; } - String mapFilename = mapDirName + "/" + msgType + ".map"; + String mapFilename = dirName + "/" + msgType + ".map"; File mapFile = new File(mapFilename); -- cgit 1.2.3-korg