On 2018-12-17 07:42, Philipp Kunz wrote:
I did deliberately not touch the StringBuffer in the previous patch but fully agree now I know it has a chance to be accepted. Would you accept to replace StringBuffer with plain string concatenation afterhttp://op enjdk.java.net/jeps/280 which was not in place at the time those StringBuffers were introduced?
Unfortunately JEP 280-style indified string concatenation is not enabled in the java.base module to avoid bootstrap issues. That said, even if you could benefit from ISC here, StringBuilders are likely to be better when building up your string using loops and method calls, unless there's a simple way to reduce it all down to a single concatenation expression (no passing the builder to another method, no loops etc). /Claes