You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/12 12:27:04 UTC
[jira] [Commented] (CXF-7280) Avoid unnecessary string allocation
in IOUtils::toString
[ https://issues.apache.org/jira/browse/CXF-7280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906504#comment-15906504 ]
ASF GitHub Bot commented on CXF-7280:
-------------------------------------
GitHub user stevencrockett opened a pull request:
https://github.com/apache/cxf/pull/244
CXF-7280 - Avoid unnecessary string allocation in IOUtils::toString
Issue: https://issues.apache.org/jira/browse/CXF-7280
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/stevencrockett/cxf CXF-7280
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cxf/pull/244.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #244
----
commit d90c3a9bec477e0500af6f3f1ed0a79127700e4b
Author: Steven Crockett <cr...@gmail.com>
Date: 2017-03-12T12:21:21Z
CXF-7280 - Append to the stringbuffer directly from the char array instead of using intermediate String
----
> Avoid unnecessary string allocation in IOUtils::toString
> --------------------------------------------------------
>
> Key: CXF-7280
> URL: https://issues.apache.org/jira/browse/CXF-7280
> Project: CXF
> Issue Type: Improvement
> Reporter: Steven Crockett
> Priority: Trivial
>
> When buidling up the string representation, currently the array of read characters is copied into a string before being appended to the string buffer. With a stringbuilder it can take a char array and copy directly into it's internal buffer, avoiding the intermediate string.
> *first contribution to this, or any Apache project, so not sure if this needs to be categorised better.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)