diff options
author | Gavriel Fleischer <flocsy@gmail.com> | 2019-02-17 21:42:29 +0200 |
---|---|---|
committer | Gavriel Fleischer <flocsy@gmail.com> | 2019-02-17 21:43:35 +0200 |
commit | 074b1c302dcd6671737d44c69aa83d0fdd179168 (patch) | |
tree | eb13840ebd001a544e145f15016c340f57c8d651 /src/org/traccar/protocol/WatchFrameDecoder.java | |
parent | c80d01e1646b8cb1a626f33bbd488d02f15335cc (diff) | |
download | trackermap-server-074b1c302dcd6671737d44c69aa83d0fdd179168.tar.gz trackermap-server-074b1c302dcd6671737d44c69aa83d0fdd179168.tar.bz2 trackermap-server-074b1c302dcd6671737d44c69aa83d0fdd179168.zip |
resolving review issues
Diffstat (limited to 'src/org/traccar/protocol/WatchFrameDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/WatchFrameDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/WatchFrameDecoder.java b/src/org/traccar/protocol/WatchFrameDecoder.java index b4a82c0be..f99bd52e2 100644 --- a/src/org/traccar/protocol/WatchFrameDecoder.java +++ b/src/org/traccar/protocol/WatchFrameDecoder.java @@ -31,10 +31,10 @@ public class WatchFrameDecoder extends BaseFrameDecoder { if (endIndex > 0) { ByteBuf frame = Unpooled.buffer(); while (buf.readerIndex() < endIndex) { - byte b = buf.readByte(); - if (b == '}') { - byte c = buf.readByte(); - switch (c) { + byte b1 = buf.readByte(); + if (b1 == '}') { + byte b2 = buf.readByte(); + switch (b2) { case 0x01: frame.writeByte('}'); break; @@ -52,10 +52,10 @@ public class WatchFrameDecoder extends BaseFrameDecoder { break; default: throw new IllegalArgumentException(String.format( - "unexpected byte at %d: 0x%02x", buf.readerIndex() - 1, c)); + "unexpected byte at %d: 0x%02x", buf.readerIndex() - 1, b2)); } } else { - frame.writeByte(b); + frame.writeByte(b1); } } return frame; |