GitHub user BruceKuiLiu reopened a pull request:

    https://github.com/apache/camel/pull/2016

    Fix the problem of using '+' and '+=' operators to concatenate strings in a 
loop.

    
    The method is building a String using concatenation in a loop.
    In each iteration, the String is converted to a StringBuilder, appended to, 
and converted back to a String.
    This can lead to a cost quadratic in the number of iterations, as the 
growing string is recopied in each iteration.
    Better performance can be obtained by using a StringBuilder explicitly.
    
http://findbugs.sourceforge.net/bugDescriptions.html#SBSC_USE_STRINGBUFFER_CONCATENATION

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2016.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 #2016
    
----
commit a2740f23dcd023e3418ef09dffc1e3451fd7ffb0
Author: Kui LIU <brucekui...@gmail.com>
Date:   2017-10-09T20:31:05Z

    Fix the problem of using '+' and '+=' operators to concatenate strings in a 
loop.
    
    The method is building a String using concatenation in a loop.
    In each iteration, the String is converted to a StringBuilder, appended to, 
and converted back to a String.
    This can lead to a cost quadratic in the number of iterations, as the 
growing string is recopied in each iteration.
    Better performance can be obtained by using a StringBuilder explicitly.
    
http://findbugs.sourceforge.net/bugDescriptions.html#SBSC_USE_STRINGBUFFER_CONCATENATION

commit 2180d8d26ead226430ecefecae96b247523b0460
Author: Kui LIU <brucekui...@gmail.com>
Date:   2017-10-11T08:18:11Z

    Fix the problem of using '+' and '+=' operators to concatenate stringa in a 
loop.
    
    The method is building a String using concatenation in a loop.
    In each iteration, the String is converted to a StringBuilder, appended to, 
and converted back to a String.
    This can lead to a cost quadratic in the number of iterations, as the 
growing string is recopied in each iteration.
    Better performance can be obtained by using a StringBuilder explicitly.
    
http://findbugs.sourceforge.net/bugDescriptions.html#SBSC_USE_STRINGBUFFER_CONCATENATION

----


---

Reply via email to