Sometimes quick-fix actions are available which allow you to convert String
variable to StringBuilder
or
introduce a new StringBuilder
. Be careful if the original code handles null
value specially: the replacement
might not be semantically correct after that. If null
value is possible, null-safe fixes are suggested which generate
necessary null-checks. Also it's not guaranteed that the automatic replacement will always be more performant.