diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:30:28 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:30:28 +1300 |
commit | 4a5961a98b0b6576e4c6553435a70a7bca3f9b44 (patch) | |
tree | fa7d6f8f790c7a439b12c552c148b675950f1c80 /src/org/traccar/protocol/OsmAndProtocolDecoder.java | |
parent | e7bc5f93cd05f27f41bfb25836a04feb511adc17 (diff) | |
download | trackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.tar.gz trackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.tar.bz2 trackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.zip |
Replace Double.valueOf with parseDouble
Diffstat (limited to 'src/org/traccar/protocol/OsmAndProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index ecc1e1b18..e7ee74a30 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -81,22 +81,22 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { } else { position.setTime(new Date()); } - position.setLatitude(Double.valueOf(params.get("lat").get(0))); - position.setLongitude(Double.valueOf(params.get("lon").get(0))); + position.setLatitude(Double.parseDouble(params.get("lat").get(0))); + position.setLongitude(Double.parseDouble(params.get("lon").get(0))); // Optional parameters if (params.containsKey("speed")) { - position.setSpeed(Double.valueOf(params.get("speed").get(0))); + position.setSpeed(Double.parseDouble(params.get("speed").get(0))); } if (params.containsKey("bearing")) { - position.setCourse(Double.valueOf(params.get("bearing").get(0))); + position.setCourse(Double.parseDouble(params.get("bearing").get(0))); } else if (params.containsKey("heading")) { - position.setCourse(Double.valueOf(params.get("heading").get(0))); + position.setCourse(Double.parseDouble(params.get("heading").get(0))); } if (params.containsKey("altitude")) { - position.setAltitude(Double.valueOf(params.get("altitude").get(0))); + position.setAltitude(Double.parseDouble(params.get("altitude").get(0))); } if (params.containsKey("hdop")) { |