From c12a28b811b3310eab5942e9c3650d50c2df1606 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Fri, 30 Jun 2017 08:38:20 +0200 Subject: [FIX] use readable() instead of testing readableBytes() --- src/org/traccar/protocol/AplicomFrameDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/AplicomFrameDecoder.java b/src/org/traccar/protocol/AplicomFrameDecoder.java index e12848f8f..24d55f1cf 100644 --- a/src/org/traccar/protocol/AplicomFrameDecoder.java +++ b/src/org/traccar/protocol/AplicomFrameDecoder.java @@ -27,7 +27,7 @@ public class AplicomFrameDecoder extends FrameDecoder { ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { // Skip Alive message - while (buf.readableBytes() > 0 && Character.isDigit(buf.getByte(buf.readerIndex()))) { + while (buf.readable() && Character.isDigit(buf.getByte(buf.readerIndex()))) { buf.readByte(); } -- cgit v1.2.3