hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1778358 - /httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
Date Wed, 11 Jan 2017 23:45:05 GMT
Author: ggregory
Date: Wed Jan 11 23:45:05 2017
New Revision: 1778358

URL: http://svn.apache.org/viewvc?rev=1778358&view=rev
Log:
Better local var name.

Modified:
    httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java?rev=1778358&r1=1778357&r2=1778358&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
Wed Jan 11 23:45:05 2017
@@ -128,11 +128,11 @@ public final class EntityUtils {
         try {
             Args.check(entity.getContentLength() <= Integer.MAX_VALUE,
                     "HTTP entity too large to be buffered in memory");
-            int i = (int)entity.getContentLength();
-            if (i < 0) {
-                i = DEFAULT_BUFFER_SIZE;
+            int capacity = (int)entity.getContentLength();
+            if (capacity < 0) {
+                capacity = DEFAULT_BUFFER_SIZE;
             }
-            final ByteArrayBuffer buffer = new ByteArrayBuffer(i);
+            final ByteArrayBuffer buffer = new ByteArrayBuffer(capacity);
             final byte[] tmp = new byte[DEFAULT_BUFFER_SIZE];
             int l;
             while((l = instream.read(tmp)) != -1) {
@@ -205,9 +205,9 @@ public final class EntityUtils {
         try {
             Args.check(entity.getContentLength() <= Integer.MAX_VALUE,
                     "HTTP entity too large to be buffered in memory");
-            int i = (int)entity.getContentLength();
-            if (i < 0) {
-                i = DEFAULT_BUFFER_SIZE;
+            int capacity = (int)entity.getContentLength();
+            if (capacity < 0) {
+                capacity = DEFAULT_BUFFER_SIZE;
             }
             Charset charset = null;
             if (contentType != null) {
@@ -221,7 +221,7 @@ public final class EntityUtils {
                 charset = HTTP.DEF_CONTENT_CHARSET;
             }
             final Reader reader = new InputStreamReader(instream, charset);
-            final CharArrayBuffer buffer = new CharArrayBuffer(i);
+            final CharArrayBuffer buffer = new CharArrayBuffer(capacity);
             final char[] tmp = new char[1024];
             int l;
             while((l = reader.read(tmp)) != -1) {



Mime
View raw message