Statement unnecessarily nested within else clause.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1728604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b573561f8
commit
cd4fc8f885
|
@ -68,9 +68,8 @@ public class ByteArrayBuilder {
|
|||
buffer.flip();
|
||||
newBuffer.put(buffer);
|
||||
return newBuffer;
|
||||
} else {
|
||||
return buffer;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static ByteBuffer encode(
|
||||
|
@ -186,13 +185,12 @@ public class ByteArrayBuilder {
|
|||
public byte[] toByteArray() {
|
||||
if (this.buffer == null) {
|
||||
return new byte[] {};
|
||||
} else {
|
||||
this.buffer.flip();
|
||||
final byte[] b = new byte[this.buffer.remaining()];
|
||||
this.buffer.get(b);
|
||||
this.buffer.clear();
|
||||
return b;
|
||||
}
|
||||
this.buffer.flip();
|
||||
final byte[] b = new byte[this.buffer.remaining()];
|
||||
this.buffer.get(b);
|
||||
this.buffer.clear();
|
||||
return b;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
|
Loading…
Reference in New Issue