Removed redundant conditional

This commit is contained in:
Trustin Lee 2010-01-27 02:43:49 +00:00
parent cb9f90d6d5
commit 030ece5bf9
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {
int readBytes = 0;
if (!buffer.isReadOnly() && buffer.hasArray()) {
if (buffer.hasArray()) {
index += buffer.arrayOffset();
do {
int localReadBytes = in.read(buffer.array(), index, length);

View File

@ -301,7 +301,7 @@ public class ChannelBuffers {
if (!buffer.hasRemaining()) {
return EMPTY_BUFFER;
}
if (!buffer.isReadOnly() && buffer.hasArray()) {
if (buffer.hasArray()) {
return wrappedBuffer(buffer.order(), buffer.array(), buffer.arrayOffset(),buffer.remaining());
} else {
return new ByteBufferBackedChannelBuffer(buffer);