diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:25:47 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:25:47 +1300 |
commit | e7bc5f93cd05f27f41bfb25836a04feb511adc17 (patch) | |
tree | fdd2f79116c0403c6bd1fad061b07463379cdc03 /src/org/traccar/protocol/MeitrackProtocolDecoder.java | |
parent | 2260e9543dc586300b005c97ca83b2902c414968 (diff) | |
download | trackermap-server-e7bc5f93cd05f27f41bfb25836a04feb511adc17.tar.gz trackermap-server-e7bc5f93cd05f27f41bfb25836a04feb511adc17.tar.bz2 trackermap-server-e7bc5f93cd05f27f41bfb25836a04feb511adc17.zip |
Replace more valueOf with parseXxx
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocolDecoder.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 8eabcce42..fc8d67885 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -95,7 +95,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { position.setDeviceId(getDeviceId()); // Event - int event = Integer.valueOf(parser.group(index++)); + int event = Integer.parseInt(parser.group(index++)); position.set(Event.KEY_EVENT, event); // Coordinates @@ -105,12 +105,12 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { // Time Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); time.clear(); - time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++))); - time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1); - time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++))); - 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.YEAR, 2000 + Integer.parseInt(parser.group(index++))); + time.set(Calendar.MONTH, Integer.parseInt(parser.group(index++)) - 1); + time.set(Calendar.DAY_OF_MONTH, Integer.parseInt(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++))); position.setTime(time.getTime()); // Validity |