aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-01-26 19:43:49 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-01-26 19:43:58 -0800
commitdecc6d4c592b9511fda3db943f43e4a6d29841f0 (patch)
tree97c242dc312f4b8afe8f3f2f228addc8fed07ee4 /src/main/java/org/traccar
parentae4e73babace710a004172c77a88c5f2dfba3e7b (diff)
downloadtrackermap-server-decc6d4c592b9511fda3db943f43e4a6d29841f0.tar.gz
trackermap-server-decc6d4c592b9511fda3db943f43e4a6d29841f0.tar.bz2
trackermap-server-decc6d4c592b9511fda3db943f43e4a6d29841f0.zip
Support Lanyard device
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/S168ProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/S168ProtocolDecoder.java b/src/main/java/org/traccar/protocol/S168ProtocolDecoder.java
index 71aff1a65..685364483 100644
--- a/src/main/java/org/traccar/protocol/S168ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/S168ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2019 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,9 @@ public class S168ProtocolDecoder extends BaseProtocolDecoder {
String content = values[4];
String[] fragments = content.split(";");
for (String fragment : fragments) {
+ if (fragment.isEmpty()) {
+ continue;
+ }
int dataIndex = fragment.indexOf(':');
String type = fragment.substring(0, dataIndex);