toString
invoked on a string value is useless JAVA-P0064Calling String.toString
is a redundant operation. Just use the string directly.
String b = "abc".toString();
String b = "abc";
There are some exceptions to this, such as within generated code where such statements are likely to appear. Consider adding these files to the exclude_files
or exclude_patterns
to reduce false positives.