13
0
geforkt von Mirrors/Velocity

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

This is removed in Netty 5.x: netty/netty#8636
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-12-23 23:30:26 -05:00
Ursprung 41592afade
Commit 267d306569

Datei anzeigen

@ -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;
}