From 671dbc55419dd20ba16951529b28fa90a59b189a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 1 Nov 2015 15:47:53 +1300 Subject: Fix PMD and Findbugs issues --- src/org/traccar/protocol/CastelProtocolDecoder.java | 4 ++-- src/org/traccar/protocol/Gps103ProtocolDecoder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java index bf82bede1..7d4182f7c 100644 --- a/src/org/traccar/protocol/CastelProtocolDecoder.java +++ b/src/org/traccar/protocol/CastelProtocolDecoder.java @@ -203,10 +203,10 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_CELL, buf.readUnsignedShort()); positions.add(position); - - return positions; } + return positions; + } else if (type == MSG_CC_LOGIN) { sendResponse(channel, remoteAddress, version, id, MSG_CC_LOGIN_RESPONSE, null); diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 4bf1ca15d..f3811c1d7 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -127,8 +127,8 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { // Timezone calculation if (utcHours != null && utcMinutes != null) { - int deltaMinutes = (localHours - Integer.valueOf(utcHours)) * 60; - deltaMinutes += localMinutes - Integer.valueOf(utcMinutes); + int deltaMinutes = (localHours - Integer.parseInt(utcHours)) * 60; + deltaMinutes += localMinutes - Integer.parseInt(utcMinutes); if (deltaMinutes <= -12 * 60) { deltaMinutes += 24 * 60; } else if (deltaMinutes > 12 * 60) { -- cgit v1.2.3