toString
invoked on a string value is useless JAVA-P0064String.toString
is redundant and inefficient, use the string directly instead 87 break;
88 }
89 if (seat != null)
90 System.out.println(i + 10 + alphaPos + ": " + seat.name.toString()); 91 }
92 }
93 }
String.toString
is redundant and inefficient, use the string directly instead 52
53 }
54 if (seat != null)
55 System.out.println(j + 1 + alphaPos + ": " + seat.name.toString()); 56 }
57 }
58 } else {
Calling 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.