aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TrackboxProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/TrackboxProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index 79abdc5b1..a5093ab0e 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -84,10 +84,10 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
// Time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();
- time.set(Calendar.HOUR_OF_DAY, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.MILLISECOND, Integer.valueOf(parser.group(index++)));
+ time.set(Calendar.HOUR_OF_DAY, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.MINUTE, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.SECOND, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.MILLISECOND, Integer.parseInt(parser.group(index++)));
// Latitude
Double latitude = Double.valueOf(parser.group(index++));
@@ -108,7 +108,7 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
position.setAltitude(Double.valueOf(parser.group(index++)));
// Validity
- int fix = Integer.valueOf(parser.group(index++));
+ int fix = Integer.parseInt(parser.group(index++));
position.set(Event.KEY_GPS, fix);
position.setValid(fix > 0);
@@ -120,9 +120,9 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(Double.valueOf(parser.group(index++)));
// Date
- time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);
- time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));
+ time.set(Calendar.DAY_OF_MONTH, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.MONTH, Integer.parseInt(parser.group(index++)) - 1);
+ time.set(Calendar.YEAR, 2000 + Integer.parseInt(parser.group(index++)));
position.setTime(time.getTime());
// Satellites