aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WatchFrameDecoder.java
diff options
context:
space:
mode:
authorGavriel Fleischer <flocsy@gmail.com>2019-02-17 21:42:29 +0200
committerGavriel Fleischer <flocsy@gmail.com>2019-02-17 21:43:35 +0200
commit074b1c302dcd6671737d44c69aa83d0fdd179168 (patch)
treeeb13840ebd001a544e145f15016c340f57c8d651 /src/org/traccar/protocol/WatchFrameDecoder.java
parentc80d01e1646b8cb1a626f33bbd488d02f15335cc (diff)
downloadtrackermap-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.java12
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;