From c9ba2fc87382a5a872cc7a34410f9be31bac6cfe Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 13 Jun 2017 22:27:52 +0200 Subject: indentation --- src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java index 60f94db96..4baafc118 100644 --- a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java +++ b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java @@ -56,7 +56,7 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { HttpRequest request = (HttpRequest) msg; JsonObject root = Json.createReader( - new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); + new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); Position position = new Position(); position.setProtocol(getProtocolName()); @@ -66,22 +66,22 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(root.getJsonNumber("lon").doubleValue()); if (root.containsKey("vel")) { - position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); + position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); } if (root.containsKey("alt")) { - position.setAltitude(root.getInt("alt")); + position.setAltitude(root.getInt("alt")); } if (root.containsKey("cog")) { - position.setCourse(root.getInt("cog")); + position.setCourse(root.getInt("cog")); } if (root.containsKey("acc")) { - position.setAccuracy(root.getInt("acc")); + position.setAccuracy(root.getInt("acc")); } if (root.containsKey("t")) { - position.set("t", root.getString("t")); + position.set("t", root.getString("t")); } if (root.containsKey("batt")) { - position.set(Position.KEY_BATTERY, root.getInt("batt")); + position.set(Position.KEY_BATTERY, root.getInt("batt")); } long timestamp = root.getJsonNumber("tst").longValue(); @@ -92,8 +92,8 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, root.getString("tid")); if (deviceSession == null) { - sendResponse(channel, HttpResponseStatus.BAD_REQUEST); - return null; + sendResponse(channel, HttpResponseStatus.BAD_REQUEST); + return null; } position.setDeviceId(deviceSession.getDeviceId()); -- cgit v1.2.3