aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorJan-Piet Mens <jpmens@gmail.com>2017-06-15 08:05:19 +0200
committerJan-Piet Mens <jpmens@gmail.com>2017-06-15 08:05:19 +0200
commit8a5f318ed92e4bb6411c0883d1ce73dd41e9a7bc (patch)
tree376a181d9805ccd5d05318f0695049f64c5e162f /src/org/traccar
parentb52688409736837d952f10865be754e23120f42c (diff)
downloadtrackermap-server-8a5f318ed92e4bb6411c0883d1ce73dd41e9a7bc.tar.gz
trackermap-server-8a5f318ed92e4bb6411c0883d1ce73dd41e9a7bc.tar.bz2
trackermap-server-8a5f318ed92e4bb6411c0883d1ce73dd41e9a7bc.zip
remove null asignment and "pb", and use simplel booleans
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/OwnTracksProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
index f1dd2401a..34a61da89 100644
--- a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
+++ b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
@@ -85,18 +85,15 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder {
if (root.containsKey("t")) {
position.set("t", root.getString("t"));
}
- if (root.containsKey("p")) {
- position.set("pb", root.getInt("p"));
- }
if (root.containsKey("batt")) {
position.set(Position.KEY_BATTERY, root.getInt("batt"));
}
position.setTime(new Date(root.getJsonNumber("tst").longValue() * 1000));
- Boolean haveTopic = root.containsKey("topic");
- Boolean haveTid = root.containsKey("tid");
- String uniqueId = null;
+ boolean haveTopic = root.containsKey("topic");
+ boolean haveTid = root.containsKey("tid");
+ String uniqueId;
if (haveTopic) {
uniqueId = root.getString("topic");