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/V680ProtocolDecoder.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/V680ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/V680ProtocolDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java index f88dea582..abe599754 100644 --- a/src/org/traccar/protocol/V680ProtocolDecoder.java +++ b/src/org/traccar/protocol/V680ProtocolDecoder.java @@ -107,23 +107,23 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { // Longitude String lon = parser.group(index++); - Double longitude = (lon != null) ? Double.valueOf(lon) : 0.0; - longitude += Double.valueOf(parser.group(index++)) / 60; + Double longitude = (lon != null) ? Double.parseDouble(lon) : 0.0; + longitude += Double.parseDouble(parser.group(index++)) / 60; if (parser.group(index++).compareTo("W") == 0) longitude = -longitude; position.setLongitude(longitude); // Latitude String lat = parser.group(index++); - Double latitude = (lat != null) ? Double.valueOf(lat) : 0.0; - latitude += Double.valueOf(parser.group(index++)) / 60; + Double latitude = (lat != null) ? Double.parseDouble(lat) : 0.0; + latitude += Double.parseDouble(parser.group(index++)) / 60; if (parser.group(index++).compareTo("S") == 0) latitude = -latitude; position.setLatitude(latitude); // Speed and Course - position.setSpeed(Double.valueOf(parser.group(index++))); + position.setSpeed(Double.parseDouble(parser.group(index++))); String course = parser.group(index++); if (course != null) { - position.setCourse(Double.valueOf(course)); + position.setCourse(Double.parseDouble(course)); } // Date |