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 2C993200C28 for ; Mon, 13 Mar 2017 11:52:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2B53B160B6C; Mon, 13 Mar 2017 10:52:34 +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 77FE2160B60 for ; Mon, 13 Mar 2017 11:52:33 +0100 (CET) Received: (qmail 22483 invoked by uid 500); 13 Mar 2017 10:52:32 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 22469 invoked by uid 99); 13 Mar 2017 10:52:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 10:52:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6E567DFE7B; Mon, 13 Mar 2017 10:52:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: CXF-7280 - Append to the stringbuffer directly from the char array instead of using intermediate String Date: Mon, 13 Mar 2017 10:52:30 +0000 (UTC) archived-at: Mon, 13 Mar 2017 10:52:34 -0000 Repository: cxf Updated Branches: refs/heads/master 7dbb31aed -> e36d2ad10 CXF-7280 - Append to the stringbuffer directly from the char array instead of using intermediate String Signed-off-by: Colm O hEigeartaigh This closes #244. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e36d2ad1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e36d2ad1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e36d2ad1 Branch: refs/heads/master Commit: e36d2ad108c8a7fd52ef8ceececfc5f818553fc4 Parents: 7dbb31a Author: Steven Crockett Authored: Sun Mar 12 12:21:21 2017 +0000 Committer: Colm O hEigeartaigh Committed: Mon Mar 13 10:52:12 2017 +0000 ---------------------------------------------------------------------- core/src/main/java/org/apache/cxf/helpers/IOUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/e36d2ad1/core/src/main/java/org/apache/cxf/helpers/IOUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/helpers/IOUtils.java b/core/src/main/java/org/apache/cxf/helpers/IOUtils.java index f6feeae..4fe9508 100644 --- a/core/src/main/java/org/apache/cxf/helpers/IOUtils.java +++ b/core/src/main/java/org/apache/cxf/helpers/IOUtils.java @@ -312,13 +312,12 @@ public final class IOUtils { StringBuilder buf = new StringBuilder(); final char[] buffer = new char[bufSize]; try { - int n = 0; - n = input.read(buffer); + int n = input.read(buffer); while (-1 != n) { if (n == 0) { throw new IOException("0 bytes read in violation of InputStream.read(byte[])"); } - buf.append(new String(buffer, 0, n)); + buf.append(buffer, 0, n); n = input.read(buffer); } return buf.toString();