You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/03/13 10:52:30 UTC
cxf git commit: CXF-7280 - Append to the stringbuffer directly from
the char array instead of using intermediate String
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 <co...@apache.org>
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 <cr...@gmail.com>
Authored: Sun Mar 12 12:21:21 2017 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
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();