diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/utils/ByteArrayBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/utils/ByteArrayBuilder.java index f68797ac5..d8a8b6400 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/utils/ByteArrayBuilder.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/utils/ByteArrayBuilder.java @@ -201,7 +201,7 @@ public final class ByteArrayBuilder { @Override public String toString() { - return this.buffer != null ? this.buffer.toString() : "null"; + return String.valueOf(this.buffer); } }