diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:19:28 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:19:28 +1300 |
commit | 2260e9543dc586300b005c97ca83b2902c414968 (patch) | |
tree | 0ac295e51c084fae971684f5e5ac114ebc733f09 /src/org/traccar/protocol/HaicomProtocolDecoder.java | |
parent | 83382e14d92cadaa40c62d07cdba05a6ded5af83 (diff) | |
download | trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.tar.gz trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.tar.bz2 trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.zip |
Replace valueOf with parseXxx calls
Diffstat (limited to 'src/org/traccar/protocol/HaicomProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/HaicomProtocolDecoder.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/HaicomProtocolDecoder.java b/src/org/traccar/protocol/HaicomProtocolDecoder.java index 3062c72d5..911479bbb 100644 --- a/src/org/traccar/protocol/HaicomProtocolDecoder.java +++ b/src/org/traccar/protocol/HaicomProtocolDecoder.java @@ -83,16 +83,16 @@ public class HaicomProtocolDecoder extends BaseProtocolDecoder { // Date 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 - int flags = Integer.valueOf(parser.group(index++)); + int flags = Integer.parseInt(parser.group(index++)); position.setValid((flags & 0x1) != 0); // Latitude |