garydgregory commented on a change in pull request #161: EntityUtils clean ups 
and internal refactoring
URL: 
https://github.com/apache/httpcomponents-core/pull/161#discussion_r347493798
 
 

 ##########
 File path: 
httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java
 ##########
 @@ -107,12 +117,8 @@ public static void consume(final HttpEntity entity) 
throws IOException {
             if (inStream == null) {
                 return null;
             }
-            int i = (int) Args.checkContentLength(entity);
-            if (i < 0) {
-                i = 4096;
-            }
-            final ByteArrayBuffer buffer = new ByteArrayBuffer(i);
-            final byte[] tmp = new byte[4096];
+            final ByteArrayBuffer buffer = new 
ByteArrayBuffer(getCheckedContentLength(entity));
 
 Review comment:
   +1
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to