From 8a5f318ed92e4bb6411c0883d1ce73dd41e9a7bc Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Thu, 15 Jun 2017 08:05:19 +0200 Subject: remove null asignment and "pb", and use simplel booleans --- src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/org/traccar/protocol') 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"); -- cgit v1.2.3