diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-28 11:06:25 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-28 11:06:25 -0800 |
commit | f54ec00be2611c274e442cd6b2fd5ccdcf433ae5 (patch) | |
tree | 5387cd15a36187d6a739aae47ddd51e4721c8a2a /src/main/java/org/traccar/config/Config.java | |
parent | 04cd9f4d14111b6d568a8ddd7e5501873276b339 (diff) | |
download | trackermap-server-f54ec00be2611c274e442cd6b2fd5ccdcf433ae5.tar.gz trackermap-server-f54ec00be2611c274e442cd6b2fd5ccdcf433ae5.tar.bz2 trackermap-server-f54ec00be2611c274e442cd6b2fd5ccdcf433ae5.zip |
Migrate more config keys
Diffstat (limited to 'src/main/java/org/traccar/config/Config.java')
-rw-r--r-- | src/main/java/org/traccar/config/Config.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/config/Config.java b/src/main/java/org/traccar/config/Config.java index 77184a528..1231918c6 100644 --- a/src/main/java/org/traccar/config/Config.java +++ b/src/main/java/org/traccar/config/Config.java @@ -15,6 +15,8 @@ */ package org.traccar.config; +import com.google.common.annotations.VisibleForTesting; + import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -133,18 +135,14 @@ public class Config { } public double getDouble(ConfigKey key) { - return getDouble(key.getKey(), 0.0); + return getDouble(key, 0.0); } public double getDouble(ConfigKey key, double defaultValue) { - return getDouble(key.getKey(), defaultValue); - } - - @Deprecated - public double getDouble(String key, double defaultValue) { - return hasKey(key) ? Double.parseDouble(getString(key)) : defaultValue; + return hasKey(key.getKey()) ? Double.parseDouble(getString(key.getKey())) : defaultValue; } + @VisibleForTesting public void setString(ConfigKey key, String value) { properties.put(key.getKey(), value); } |