Re: Replace concat String to append in StringBuilder parameters

2014-08-26 Thread Pavel Rappo
It's exactly the way it's been working since 1.6 I believe. public class Optimization { public String concat(String... strings) { return "#: " + strings[0] + strings[2] + strings[3] + "..."; } } public class Optimization { public Optimization(); Code: 0: aload_0

Re: Replace concat String to append in StringBuilder parameters

2014-08-12 Thread Pavel Rappo
Otavio, Just skimmed through your changes. It looks good. But there are some things we can make a little bit better though. IMO, it's not always a performance that matters (looking around to see if Alexey Shipilev is somewhere near) but readability. It's good to estimate performance requirement

Re: Replace concat String to append in StringBuilder parameters

2014-08-12 Thread Pavel Rappo
> In the class > src/share/classes/javax/management/openmbean/CompositeType.java you have > added the > annotation @SuppressWarnings("StringConcatenationInsideStringBufferAppend") > instead of fixing the concatenation inside the append method. Why? +1 Moreover, I wonder where this value comes from