From bb9dac7fb639788cb210c27274a9481d37374eed Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Thu, 15 Jun 2017 08:23:00 +0200 Subject: omit booleans --- src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java index 34a61da89..ea604f4ac 100644 --- a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java +++ b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java @@ -91,13 +91,11 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { position.setTime(new Date(root.getJsonNumber("tst").longValue() * 1000)); - boolean haveTopic = root.containsKey("topic"); - boolean haveTid = root.containsKey("tid"); String uniqueId; - if (haveTopic) { + if (root.containsKey("topic")) { uniqueId = root.getString("topic"); - if (haveTid) { + if (root.containsKey("tid")) { position.set("tid", root.getString("tid")); } } else { -- cgit v1.2.3