Serwios commented on PR #1332:
URL: https://github.com/apache/commons-lang/pull/1332#issuecomment-2541819216
Hi, in JDK 8 and earlier, + compiles to StringBuilder. From JDK 9 onward, it
uses StringConcatFactory, which optimizes simple cases like this to behave
similarly to StringBuilder.
This guarantee should be present as return type.getLabel() + ' ' +
arch.getLabel(); is compiled to return new
StringBuilder().append(type.getLabel()).append('
').append(arch.getLabel()).toString();
https://stackoverflow.com/questions/11942368/why-use-stringbuilder-explicitly-if-the-compiler-converts-string-concatenation-t
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]