aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-28 14:38:59 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-28 14:38:59 -0800
commit800a5a3d04dde2cb6143fa8d5360b5cec8475f18 (patch)
treeec75dfe84560f025eceed9aef70dee38f16078ba /src/main/java/org/traccar/config
parent648616bb85fb44c8e4366b99f6ae898e2d0ab978 (diff)
downloadtrackermap-server-800a5a3d04dde2cb6143fa8d5360b5cec8475f18.tar.gz
trackermap-server-800a5a3d04dde2cb6143fa8d5360b5cec8475f18.tar.bz2
trackermap-server-800a5a3d04dde2cb6143fa8d5360b5cec8475f18.zip
Fix warnings
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r--src/main/java/org/traccar/config/Config.java12
-rw-r--r--src/main/java/org/traccar/config/ConfigKey.java4
2 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/config/Config.java b/src/main/java/org/traccar/config/Config.java
index 13d9ccc83..dd63c2999 100644
--- a/src/main/java/org/traccar/config/Config.java
+++ b/src/main/java/org/traccar/config/Config.java
@@ -55,7 +55,7 @@ public class Config {
}
}
- public boolean hasKey(ConfigKey key) {
+ public boolean hasKey(ConfigKey<String> key) {
return hasKey(key.getKey());
}
@@ -65,7 +65,7 @@ public class Config {
|| properties.containsKey(key);
}
- public String getString(ConfigKey key) {
+ public String getString(ConfigKey<String> key) {
return getString(key.getKey());
}
@@ -80,7 +80,7 @@ public class Config {
return properties.getProperty(key);
}
- public String getString(ConfigKey key, String defaultValue) {
+ public String getString(ConfigKey<String> key, String defaultValue) {
return getString(key.getKey(), defaultValue);
}
@@ -89,7 +89,7 @@ public class Config {
return hasKey(key) ? getString(key) : defaultValue;
}
- public boolean getBoolean(ConfigKey key) {
+ public boolean getBoolean(ConfigKey<Boolean> key) {
return getBoolean(key.getKey());
}
@@ -98,7 +98,7 @@ public class Config {
return Boolean.parseBoolean(getString(key));
}
- public int getInteger(ConfigKey key) {
+ public int getInteger(ConfigKey<Integer> key) {
return getInteger(key.getKey());
}
@@ -107,7 +107,7 @@ public class Config {
return getInteger(key, 0);
}
- public int getInteger(ConfigKey key, int defaultValue) {
+ public int getInteger(ConfigKey<Integer> key, int defaultValue) {
return getInteger(key.getKey(), defaultValue);
}
diff --git a/src/main/java/org/traccar/config/ConfigKey.java b/src/main/java/org/traccar/config/ConfigKey.java
index cc095c087..c046a46a5 100644
--- a/src/main/java/org/traccar/config/ConfigKey.java
+++ b/src/main/java/org/traccar/config/ConfigKey.java
@@ -37,6 +37,10 @@ public class ConfigKey<T> {
return key;
}
+ public List<KeyType> getTypes() {
+ return types;
+ }
+
public T getDefaultValue() {
return defaultValue;
}