[#3373] Rename class to match naming scheme

Motivation:

The ReplayingDecoderBuffer does not match the naming scheme we use for ByteBuf types.

Modifications:

Rename to ReplayingDecoderByteBuf to match naming scheme

Result:

Consistent naming
This commit is contained in:
Norman Maurer 2015-04-09 21:03:49 +02:00
parent d8e5d421e1
commit aa1e537de4
3 changed files with 9 additions and 9 deletions

View File

@ -269,7 +269,7 @@ public abstract class ReplayingDecoder<S> extends ByteToMessageDecoder {
static final Signal REPLAY = Signal.valueOf(ReplayingDecoder.class, "REPLAY"); static final Signal REPLAY = Signal.valueOf(ReplayingDecoder.class, "REPLAY");
private final ReplayingDecoderBuffer replayable = new ReplayingDecoderBuffer(); private final ReplayingDecoderByteBuf replayable = new ReplayingDecoderByteBuf();
private S state; private S state;
private int checkpoint = -1; private int checkpoint = -1;

View File

@ -34,7 +34,7 @@ import java.nio.charset.Charset;
/** /**
* Special {@link ByteBuf} implementation which is used by the {@link ReplayingDecoder} * Special {@link ByteBuf} implementation which is used by the {@link ReplayingDecoder}
*/ */
final class ReplayingDecoderBuffer extends ByteBuf { final class ReplayingDecoderByteBuf extends ByteBuf {
private static final Signal REPLAY = ReplayingDecoder.REPLAY; private static final Signal REPLAY = ReplayingDecoder.REPLAY;
@ -42,15 +42,15 @@ final class ReplayingDecoderBuffer extends ByteBuf {
private boolean terminated; private boolean terminated;
private SwappedByteBuf swapped; private SwappedByteBuf swapped;
static final ReplayingDecoderBuffer EMPTY_BUFFER = new ReplayingDecoderBuffer(Unpooled.EMPTY_BUFFER); static final ReplayingDecoderByteBuf EMPTY_BUFFER = new ReplayingDecoderByteBuf(Unpooled.EMPTY_BUFFER);
static { static {
EMPTY_BUFFER.terminate(); EMPTY_BUFFER.terminate();
} }
ReplayingDecoderBuffer() { } ReplayingDecoderByteBuf() { }
ReplayingDecoderBuffer(ByteBuf buffer) { ReplayingDecoderByteBuf(ByteBuf buffer) {
setCumulation(buffer); setCumulation(buffer);
} }

View File

@ -24,14 +24,14 @@ import org.junit.Test;
import static io.netty.util.ReferenceCountUtil.releaseLater; import static io.netty.util.ReferenceCountUtil.releaseLater;
import static org.junit.Assert.*; import static org.junit.Assert.*;
public class ReplayingDecoderBufferTest { public class ReplayingDecoderByteBufTest {
/** /**
* See https://github.com/netty/netty/issues/445 * See https://github.com/netty/netty/issues/445
*/ */
@Test @Test
public void testGetUnsignedByte() { public void testGetUnsignedByte() {
ReplayingDecoderBuffer buffer = new ReplayingDecoderBuffer(releaseLater(Unpooled.copiedBuffer("TestBuffer", ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(releaseLater(Unpooled.copiedBuffer("TestBuffer",
CharsetUtil.ISO_8859_1))); CharsetUtil.ISO_8859_1)));
boolean error; boolean error;
@ -54,7 +54,7 @@ public class ReplayingDecoderBufferTest {
*/ */
@Test @Test
public void testGetByte() { public void testGetByte() {
ReplayingDecoderBuffer buffer = new ReplayingDecoderBuffer(releaseLater(Unpooled.copiedBuffer("TestBuffer", ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(releaseLater(Unpooled.copiedBuffer("TestBuffer",
CharsetUtil.ISO_8859_1))); CharsetUtil.ISO_8859_1)));
boolean error; boolean error;
@ -81,7 +81,7 @@ public class ReplayingDecoderBufferTest {
while (buf.isWritable()) { while (buf.isWritable()) {
buf.writeBoolean(true); buf.writeBoolean(true);
} }
ReplayingDecoderBuffer buffer = new ReplayingDecoderBuffer(buf); ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(buf);
boolean error; boolean error;
int i = 0; int i = 0;