Java StringBuilder suggestion in Java 11+ mostly obsolete

I wonder if you should revise/enhance the suggestion to use SpringBuilder instead of + in Java 11 and later code.
The StringBuilder advice is dead, or isn’t it? - Performance, Java, Testing, and Things
It’s unnecessary in modern code with exception of loops.
At least i think i saw complains about some few strings concatenation outside a loop, although i guess method might been called in a loop.

Hi Sten,

Your post was very timely, as we’ve recently been working on performance rules.

Modern JVMs can indeed change some of the classic advice. To make informed decisions, benchmarking is always essential, and performance tuning is only beneficial for code executed repeatedly.

To reflect this, we recently updated our performance rules with benchmarks. For example, S1643 and S3024 specifically address the usage of StringBuilder, but only for code called in loops.

Obviously, we may have missed some rules. If you identify any that appear obsolete, please let us know. We’ll create a ticket to address them in our next performance-related update.