remove some dead code

This commit is contained in:
bgallagher 2013-08-09 17:12:14 -04:00 committed by Norman Maurer
parent 280afda013
commit 9f88552f12
3 changed files with 2 additions and 9 deletions

View File

@ -131,9 +131,7 @@ class ReadOnlyByteBufferBuf extends AbstractReferenceCountedByteBuf {
@Override
public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
checkDstIndex(index, length, dstIndex, dst.length);
if (dst == null) {
throw new NullPointerException("dst");
}
if (dstIndex < 0 || dstIndex > dst.length - length) {
throw new IndexOutOfBoundsException(String.format(
"dstIndex: %d, length: %d (expected: range(0, %d))", dstIndex, length, dst.length));

View File

@ -275,9 +275,7 @@ public class UnpooledDirectByteBuf extends AbstractReferenceCountedByteBuf {
@Override
public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
checkDstIndex(index, length, dstIndex, dst.length);
if (dst == null) {
throw new NullPointerException("dst");
}
if (dstIndex < 0 || dstIndex > dst.length - length) {
throw new IndexOutOfBoundsException(String.format(
"dstIndex: %d, length: %d (expected: range(0, %d))", dstIndex, length, dst.length));

View File

@ -156,9 +156,6 @@ public abstract class AbstractOioByteChannel extends AbstractOioChannel {
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
for (;;) {
Object msg = in.current();
if (in == null) {
break;
}
if (msg instanceof ByteBuf) {
ByteBuf buf = (ByteBuf) msg;