diff options
author | merabtenei <i.merabtene.gd@gmail.com> | 2023-05-28 21:38:14 +0100 |
---|---|---|
committer | merabtenei <i.merabtene.gd@gmail.com> | 2023-05-28 21:38:14 +0100 |
commit | 6cc15fb06c9490e349847e043eea7c188e88794e (patch) | |
tree | e0e8560f6706fded3609fc83e205f4dedbee4e03 /src/main/java | |
parent | dee954b9f28c129215e9fa600e6860e2d4adb673 (diff) | |
download | trackermap-server-6cc15fb06c9490e349847e043eea7c188e88794e.tar.gz trackermap-server-6cc15fb06c9490e349847e043eea7c188e88794e.tar.bz2 trackermap-server-6cc15fb06c9490e349847e043eea7c188e88794e.zip |
fix NullPointerException when attribute key is defined and value is set to null, caused by calling .toString() on null.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/model/ExtendedModel.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/ExtendedModel.java b/src/main/java/org/traccar/model/ExtendedModel.java index 6a4f502f7..d3d247fdd 100644 --- a/src/main/java/org/traccar/model/ExtendedModel.java +++ b/src/main/java/org/traccar/model/ExtendedModel.java @@ -90,7 +90,7 @@ public class ExtendedModel extends BaseModel { } public String getString(String key, String defaultValue) { - if (attributes.containsKey(key)) { + if (attributes.containsKey(key) && attributes.get(key) != null) { return attributes.get(key).toString(); } else { return defaultValue; |