private static final Logger LOG = LoggerFactory
.getLogger(SdncDmaapConsumer.class);
- private String propertiesPath = "";
private Properties properties = null;
private MRConsumer consumer = null;
private MRConsumerResponse consumerResponse = null;
}
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);
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);
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);