diff options
-rw-r--r-- | src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java index 4baafc118..61950aef8 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()); diff --git a/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java b/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java index 30ae95d03..1eb188421 100644 --- a/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java +++ b/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java @@ -11,11 +11,11 @@ public class OwnTracksProtocolDecoderTest extends ProtocolTest { OwnTracksProtocolDecoder decoder = new OwnTracksProtocolDecoder(new OwnTracksProtocol()); - verifyPosition(decoder, request(HttpMethod.POST, "/", - buffer(text("{\"lon\":2.29513,\"lat\":48.85833,\"tst\":1497349316,\"_type\":\"location\",\"tid\":\"JJ\"}")))); + verifyPosition(decoder, request(HttpMethod.POST, "/", + buffer(text("{\"lon\":2.29513,\"lat\":48.85833,\"tst\":1497349316,\"_type\":\"location\",\"tid\":\"JJ\"}")))); - verifyPosition(decoder, request(HttpMethod.POST, "/", - buffer(text("{\"cog\":271,\"lon\":2.29513,\"acc\":5,\"vel\":61,\"vac\":21,\"lat\":48.85833,\"tst\":1497349316,\"alt\":167,\"_type\":\"location\",\"tid\":\"JJ\",\"t\":\"u\",\"batt\":67}")))); + verifyPosition(decoder, request(HttpMethod.POST, "/", + buffer(text("{\"cog\":271,\"lon\":2.29513,\"acc\":5,\"vel\":61,\"vac\":21,\"lat\":48.85833,\"tst\":1497349316,\"alt\":167,\"_type\":\"location\",\"tid\":\"JJ\",\"t\":\"u\",\"batt\":67}")))); } |