summaryrefslogtreecommitdiffstats
path: root/datarouter-node/src
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node/src')
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
index 298e1858..5b5245da 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
@@ -112,10 +112,10 @@ public class NodeConfigManager implements DeliveryQueueHelper {
private NodeConfigManager() {
Properties drNodeProperties = new Properties();
- try {
+ try (FileInputStream fileInputStream = new FileInputStream(System
+ .getProperty("org.onap.dmaap.datarouter.node.properties", "/opt/app/datartr/etc/node.properties"))) {
eelfLogger.debug("NODE0301 Loading local config file node.properties");
- drNodeProperties.load(new FileInputStream(System
- .getProperty("org.onap.dmaap.datarouter.node.properties", "/opt/app/datartr/etc/node.properties")));
+ drNodeProperties.load(fileInputStream);
} catch (Exception e) {
NodeUtils.setIpAndFqdnForEelf(NODE_CONFIG_MANAGER);
eelfLogger.error(EelfMsgs.MESSAGE_PROPERTIES_LOAD_ERROR, e,