From eb4ee7a9d4d0f132546b164c3483d62eb9e9f0db Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 8 Oct 2015 15:08:33 +1300 Subject: Clean up reported PMD issues --- src/org/traccar/protocol/CityeasyProtocolDecoder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/protocol/CityeasyProtocolDecoder.java') diff --git a/src/org/traccar/protocol/CityeasyProtocolDecoder.java b/src/org/traccar/protocol/CityeasyProtocolDecoder.java index 158d84ea3..d4235c191 100644 --- a/src/org/traccar/protocol/CityeasyProtocolDecoder.java +++ b/src/org/traccar/protocol/CityeasyProtocolDecoder.java @@ -71,10 +71,8 @@ public class CityeasyProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedShort(); // length String imei = ChannelBufferTools.readHexString(buf, 14); - if (!identify(imei, channel, null, false)) { - if (!identify(imei + Checksum.luhn(Long.parseLong(imei)), channel)) { - return null; - } + if (!identify(imei, channel, null, false) && !identify(imei + Checksum.luhn(Long.parseLong(imei)), channel)) { + return null; } int type = buf.readUnsignedShort(); -- cgit v1.2.3