aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-07 23:03:45 +1200
committerGitHub <noreply@github.com>2017-09-07 23:03:45 +1200
commit7294d12706466840562b073a5a58a3696c0e54da (patch)
treea3c474d75b2393149bd89a2a9b9580444ba00a61 /src/org/traccar/protocol
parentf0578c7b5f8737e019a9cf05935d2caaa940f0ca (diff)
parentee28d68243892623df7f718d50cd3ea5791f35ee (diff)
downloadtrackermap-server-7294d12706466840562b073a5a58a3696c0e54da.tar.gz
trackermap-server-7294d12706466840562b073a5a58a3696c0e54da.tar.bz2
trackermap-server-7294d12706466840562b073a5a58a3696c0e54da.zip
Merge pull request #3511 from Abyss777/attributes_types
Handle correct and incorrect attribute types
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index c06582a15..15a71c88b 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -135,7 +135,17 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
try {
position.set(entry.getKey(), Double.parseDouble(value));
} catch (NumberFormatException e) {
- position.set(entry.getKey(), value);
+ switch (value) {
+ case "true":
+ position.set(entry.getKey(), true);
+ break;
+ case "false":
+ position.set(entry.getKey(), false);
+ break;
+ default:
+ position.set(entry.getKey(), value);
+ break;
+ }
}
break;
}