diff options
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<String, String> loadMap(String msgType, String mapDirName) { Map<String, String> 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); |