Literals should not be converted to string using concatenation
A source code analyzer
Brought to you by:
adangel,
juansotuyo
Hi,
Could anyone help me write a custom rule in Java for SonarQube to not convert literals to strings by concatenating them with strings. Use one of the type-specific toString() methods instead:
String s = "" + 123; // inefficient
String t = Integer.toString(456); // preferred approach
Thank you.