Removed redundant conditional
This commit is contained in:
parent
cb9f90d6d5
commit
030ece5bf9
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user