You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2018/08/03 17:11:57 UTC
httpcomponents-core git commit: Better lvar names.
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 635aad7b3 -> b355921a9
Better lvar names.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/b355921a
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/b355921a
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/b355921a
Branch: refs/heads/master
Commit: b355921a914a90b10824a25efa671f4b695a397a
Parents: 635aad7
Author: Gary Gregory <gg...@apache.org>
Authored: Fri Aug 3 11:11:55 2018 -0600
Committer: Gary Gregory <gg...@apache.org>
Committed: Fri Aug 3 11:11:55 2018 -0600
----------------------------------------------------------------------
.../apache/hc/core5/http/io/entity/EntityUtils.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/b355921a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java
index fa5a586..feae3d7 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/EntityUtils.java
@@ -225,9 +225,9 @@ public final class EntityUtils {
return null;
}
try {
- int i = (int) Args.checkContentLength(entity);
- if (i < 0) {
- i = 4096;
+ int contentLength = (int) Args.checkContentLength(entity);
+ if (contentLength < 0) {
+ contentLength = 4096;
}
Charset charset = null;
if (contentType != null) {
@@ -241,11 +241,11 @@ public final class EntityUtils {
charset = StandardCharsets.ISO_8859_1;
}
final Reader reader = new InputStreamReader(instream, charset);
- final CharArrayBuffer buffer = new CharArrayBuffer(i);
+ final CharArrayBuffer buffer = new CharArrayBuffer(contentLength);
final char[] tmp = new char[1024];
- int l;
- while((l = reader.read(tmp)) != -1) {
- buffer.append(tmp, 0, l);
+ int chReadCount;
+ while((chReadCount = reader.read(tmp)) != -1) {
+ buffer.append(tmp, 0, chReadCount);
}
return buffer.toString();
} finally {