Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F3EFE200C08 for ; Thu, 12 Jan 2017 00:45:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F2941160B50; Wed, 11 Jan 2017 23:45:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 48C7D160B4E for ; Thu, 12 Jan 2017 00:45:07 +0100 (CET) Received: (qmail 73109 invoked by uid 500); 11 Jan 2017 23:45:06 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 73100 invoked by uid 99); 11 Jan 2017 23:45:06 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2017 23:45:06 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D2F7F3A05E1 for ; Wed, 11 Jan 2017 23:45:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170111234505.D2F7F3A05E1@svn01-us-west.apache.org> archived-at: Wed, 11 Jan 2017 23:45:08 -0000 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) {