diff options
Diffstat (limited to 'src/org/traccar/protocol/TaipProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TaipProtocolDecoder.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java index 180be3268..0953b739a 100644 --- a/src/org/traccar/protocol/TaipProtocolDecoder.java +++ b/src/org/traccar/protocol/TaipProtocolDecoder.java @@ -141,20 +141,20 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { String seconds = parser.group(index++); if (seconds != null) { if (week != null && day != null) { - position.setTime(getTime(Integer.valueOf(week), Integer.valueOf(day), Integer.valueOf(seconds))); + position.setTime(getTime(Integer.parseInt(week), Integer.parseInt(day), Integer.parseInt(seconds))); } else { - position.setTime(getTime(Integer.valueOf(seconds))); + position.setTime(getTime(Integer.parseInt(seconds))); } index += 6; } else { Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); time.clear(); - 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.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.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++))); + 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()); } @@ -173,7 +173,7 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { position.setCourse(Double.valueOf(parser.group(index++))); // Validity - position.setValid(Integer.valueOf(parser.group(index++)) != 0); + position.setValid(Integer.parseInt(parser.group(index++)) != 0); return position; } |