diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-25 20:02:22 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-26 08:41:45 +1300 |
commit | 8535983fea8c09046c53f2ebf388bbf3fae594ce (patch) | |
tree | a9f60c445ea163450b8886f7988853d86088db10 /src/org/traccar/protocol | |
parent | 1c915fa1360f416ec88f4095664a887ceea2bc15 (diff) | |
download | traccar-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.tar.gz traccar-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.tar.bz2 traccar-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.zip |
Clean up unnecessary code
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/TmgFrameDecoder.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/TmgFrameDecoder.java b/src/org/traccar/protocol/TmgFrameDecoder.java index 549c42466..c39cf03ac 100644 --- a/src/org/traccar/protocol/TmgFrameDecoder.java +++ b/src/org/traccar/protocol/TmgFrameDecoder.java @@ -37,13 +37,10 @@ public class TmgFrameDecoder extends FrameDecoder { if (buffer.getByte(guessedIndex) != (byte) '$' || buffer.writerIndex() - guessedIndex < 5) { return false; } - if (buffer.getByte(guessedIndex + 4) == ',' + return buffer.getByte(guessedIndex + 4) == ',' && isLetter(buffer.getByte(guessedIndex + 1)) && isLetter(buffer.getByte(guessedIndex + 2)) - && isLetter(buffer.getByte(guessedIndex + 3))) { - return true; - } - return false; + && isLetter(buffer.getByte(guessedIndex + 3)); } }); |