Removed redundant conditional
This commit is contained in:
parent
cb9f90d6d5
commit
030ece5bf9
@ -225,7 +225,7 @@ public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {
|
|||||||
|
|
||||||
int readBytes = 0;
|
int readBytes = 0;
|
||||||
|
|
||||||
if (!buffer.isReadOnly() && buffer.hasArray()) {
|
if (buffer.hasArray()) {
|
||||||
index += buffer.arrayOffset();
|
index += buffer.arrayOffset();
|
||||||
do {
|
do {
|
||||||
int localReadBytes = in.read(buffer.array(), index, length);
|
int localReadBytes = in.read(buffer.array(), index, length);
|
||||||
|
@ -301,7 +301,7 @@ public class ChannelBuffers {
|
|||||||
if (!buffer.hasRemaining()) {
|
if (!buffer.hasRemaining()) {
|
||||||
return EMPTY_BUFFER;
|
return EMPTY_BUFFER;
|
||||||
}
|
}
|
||||||
if (!buffer.isReadOnly() && buffer.hasArray()) {
|
if (buffer.hasArray()) {
|
||||||
return wrappedBuffer(buffer.order(), buffer.array(), buffer.arrayOffset(),buffer.remaining());
|
return wrappedBuffer(buffer.order(), buffer.array(), buffer.arrayOffset(),buffer.remaining());
|
||||||
} else {
|
} else {
|
||||||
return new ByteBufferBackedChannelBuffer(buffer);
|
return new ByteBufferBackedChannelBuffer(buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user