Remove all uses of (mark|reset)ReaderIndex()

This is removed in Netty 5.x: netty/netty#8636
This commit is contained in:
Andrew Steinborn
2018-12-23 23:30:26 -05:00
parent 41592afade
commit 267d306569

View File

@@ -16,12 +16,12 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder {
return;
}
in.markReaderIndex();
int origReaderIndex = in.readerIndex();
byte[] lenBuf = new byte[3];
for (int i = 0; i < lenBuf.length; i++) {
if (!in.isReadable()) {
in.resetReaderIndex();
in.readerIndex(origReaderIndex);
return;
}
@@ -33,7 +33,7 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder {
}
if (in.readableBytes() < packetLength) {
in.resetReaderIndex();
in.readerIndex(origReaderIndex);
return;
}