aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Config.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 11:12:18 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 11:12:18 +1300
commit43a64fc359f8acf08f97d70ebdb93dafa607dc08 (patch)
tree52da0b19c3da83a57348f603e7dd6467b6717b96 /src/org/traccar/Config.java
parente997c2642b35350241614acaef6d606e37223fe6 (diff)
downloadtrackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.tar.gz
trackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.tar.bz2
trackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.zip
Remove data model and fix some issues
Diffstat (limited to 'src/org/traccar/Config.java')
-rw-r--r--src/org/traccar/Config.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/Config.java b/src/org/traccar/Config.java
index 719f23038..49d6e4fde 100644
--- a/src/org/traccar/Config.java
+++ b/src/org/traccar/Config.java
@@ -17,6 +17,7 @@ package org.traccar;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Properties;
public class Config {
@@ -24,7 +25,9 @@ public class Config {
private final Properties properties = new Properties();
public void load(String file) throws IOException {
- properties.loadFromXML(new FileInputStream(file));
+ try (InputStream inputStream = new FileInputStream(file)) {
+ properties.loadFromXML(inputStream);
+ }
}
public boolean hasKey(String key) {