aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/StringProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-11-10 14:37:08 -0800
committerGitHub <noreply@github.com>2019-11-10 14:37:08 -0800
commit9889611b00b6159fddbdddc236448884886fe2ef (patch)
treed2892db8c323ef88398370e9120ac0cae4cdee20 /src/main/java/org/traccar/StringProtocolEncoder.java
parent0ce8f90d8a8fd4315b439fe124ecebbd78ac4aa1 (diff)
parent61d07a123beeaa1e85f44046413a680aabda0c9c (diff)
downloadtrackermap-server-9889611b00b6159fddbdddc236448884886fe2ef.tar.gz
trackermap-server-9889611b00b6159fddbdddc236448884886fe2ef.tar.bz2
trackermap-server-9889611b00b6159fddbdddc236448884886fe2ef.zip
Merge pull request #4436 from flocsy/set-language
added language to watch protocol's set_timezone command
Diffstat (limited to 'src/main/java/org/traccar/StringProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/StringProtocolEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/StringProtocolEncoder.java b/src/main/java/org/traccar/StringProtocolEncoder.java
index 40dfb25b6..e9fb65500 100644
--- a/src/main/java/org/traccar/StringProtocolEncoder.java
+++ b/src/main/java/org/traccar/StringProtocolEncoder.java
@@ -39,7 +39,7 @@ public abstract class StringProtocolEncoder extends BaseProtocolEncoder {
if (valueFormatter != null) {
value = valueFormatter.formatValue(keys[i], object);
}
- if (value == null) {
+ if (value == null && object != null) {
value = object.toString();
}
if (value == null) {