aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model/ExtendedModel.java
diff options
context:
space:
mode:
authorNikolay Vlahovski <nvlahovski@gmail.com>2023-05-18 09:35:27 +0300
committerGitHub <noreply@github.com>2023-05-18 09:35:27 +0300
commitadbe25e9daa125e989c853068bc600c61234c342 (patch)
treebcba9f4c91ed6dbb5dc29a275fe24c063c1c145b /src/main/java/org/traccar/model/ExtendedModel.java
parent074dc016d21f9848140d125c2812d8abf25e8d53 (diff)
parentfbd3ee0d77673d94766a87aa67c05885e44aa7e5 (diff)
downloadtrackermap-server-adbe25e9daa125e989c853068bc600c61234c342.tar.gz
trackermap-server-adbe25e9daa125e989c853068bc600c61234c342.tar.bz2
trackermap-server-adbe25e9daa125e989c853068bc600c61234c342.zip
Merge branch 'traccar:master' into master
Diffstat (limited to 'src/main/java/org/traccar/model/ExtendedModel.java')
-rw-r--r--src/main/java/org/traccar/model/ExtendedModel.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/model/ExtendedModel.java b/src/main/java/org/traccar/model/ExtendedModel.java
index 7a61eda8c..6a4f502f7 100644
--- a/src/main/java/org/traccar/model/ExtendedModel.java
+++ b/src/main/java/org/traccar/model/ExtendedModel.java
@@ -89,14 +89,18 @@ public class ExtendedModel extends BaseModel {
}
}
- public String getString(String key) {
+ public String getString(String key, String defaultValue) {
if (attributes.containsKey(key)) {
return attributes.get(key).toString();
} else {
- return null;
+ return defaultValue;
}
}
+ public String getString(String key) {
+ return getString(key, null);
+ }
+
public double getDouble(String key) {
if (attributes.containsKey(key)) {
Object value = attributes.get(key);