You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 20:01:42 UTC
[16/50] httpcomponents-core git commit: Better local var name.
Better local var name.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.4.x@1778358 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/f484626c
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/f484626c
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/f484626c
Branch: refs/heads/4.4.x
Commit: f484626c086537409e8091ba9bd521e503ae4119
Parents: 5f80041
Author: Gary D. Gregory <gg...@apache.org>
Authored: Wed Jan 11 23:45:05 2017 +0000
Committer: Gary D. Gregory <gg...@apache.org>
Committed: Wed Jan 11 23:45:05 2017 +0000
----------------------------------------------------------------------
.../main/java/org/apache/http/util/EntityUtils.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/f484626c/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/util/EntityUtils.java b/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
index e401f4e..ac795b2 100644
--- a/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
+++ b/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
@@ -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) {