DESCRIPTION

[findBugs] Use StringBuffer to concatenate Strings in a loop

Change-Id: I0362de3cb8c87297ece196415b9c09a4f908703d
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Leslie Stephenson
date: 2011-05-12 23:26:29.000000000

Patch Set 1: I would prefer that you didn't submit this

Actually JVM uses StringBuffer (on bytecode level) for all append operations on strings.

Lets suppose that in feature somebody will implement better append algorithm than it is actually used in StringBuffer and this new implementation would replace StringBuffer in complied java classes. If we are bind to StringBuffer implementation in our code we should replace it, but if we would be relaying on JVM string-appending-implementation we'll get performance boost after code recompilation.

Therefore I'm not sure that should we tray to be more intelligent then java compiler and JVM developers ...

-------------------------------------
author: Brenden Conley
date: 2011-05-12 23:32:59.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/710/ 

-------------------------------------
author: Brenden Conley
date: 2011-05-12 23:40:24.000000000

Patch Set 1: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/710/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2011-05-15 00:22:00.000000000

Patch Set 1:

I think the jvm uses a separate stringbuffer for each iteration in the loop, that's what findbugs is complaining about and this change will fix

-------------------------------------
