diff options
author | Damien alias Dough <dough29@gmail.com> | 2016-09-04 09:59:05 +0200 |
---|---|---|
committer | Damien alias Dough <dough29@gmail.com> | 2016-09-04 09:59:05 +0200 |
commit | f7d2f360323074081a560b168e6ddf0a875d2f38 (patch) | |
tree | 4bd0221486d33edbcbfc72c971a76cb915b34747 /src/org/traccar | |
parent | c9537fa61c07d58bccb24c9e387f09c4799a4196 (diff) | |
download | trackermap-server-f7d2f360323074081a560b168e6ddf0a875d2f38.tar.gz trackermap-server-f7d2f360323074081a560b168e6ddf0a875d2f38.tar.bz2 trackermap-server-f7d2f360323074081a560b168e6ddf0a875d2f38.zip |
Using array instead of List to split location
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index 1d4dc898a..b9a519b21 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -106,9 +106,9 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(Double.parseDouble(value)); break; case "location": - List<String> location = Arrays.asList(value.split(",")); - position.setLatitude(Double.parseDouble(location.get(0))); - position.setLongitude(Double.parseDouble(location.get(1))); + String[] location = value.split(","); + position.setLatitude(Double.parseDouble(location[0])); + position.setLongitude(Double.parseDouble(location[1])); break; case "speed": position.setSpeed(Double.parseDouble(value)); |