String.format string only contains trivial conversions
String.format
string only contains trivial conversions
Every call to String.format
creates a new Formatter
instance, which will decrease the performance of your app. String.format
should only be used when necessary--if the formatted string contains only trivial conversions (e.g. b
, s
, c
) and there are no translation concerns, it will be more efficient to replace them and concatenate with +
.
Issue id: StringFormatTrivial
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |
Last modified: 13 July 2023