aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CityeasyProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 15:08:33 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 15:08:33 +1300
commiteb4ee7a9d4d0f132546b164c3483d62eb9e9f0db (patch)
tree29bc56f0f67cd49bac31a50e415c614ed4b1c5dc /src/org/traccar/protocol/CityeasyProtocolDecoder.java
parent320d41863864485c5675c9bf8332ff0845e5e812 (diff)
downloadtrackermap-server-eb4ee7a9d4d0f132546b164c3483d62eb9e9f0db.tar.gz
trackermap-server-eb4ee7a9d4d0f132546b164c3483d62eb9e9f0db.tar.bz2
trackermap-server-eb4ee7a9d4d0f132546b164c3483d62eb9e9f0db.zip
Clean up reported PMD issues
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CityeasyProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
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();