Hi,
I found false negatives on DMI_USELESS_SUBSTRING when using SpotBugs to analyze my project.
DMI_USELESS_SUBSTRING: This code invokes substring(0) on a String, which returns the original value.
String testDMI_USELESS_SUBSTRING(int index){
StringBuilder sb = new StringBuilder();
sb.append("}");
return sb.substring(0);
}
Similar to #1927, it seems that SpotBugs does not do the same analysis on the StringBuilder class.
Hi,
I found false negatives on DMI_USELESS_SUBSTRING when using SpotBugs to analyze my project.
Similar to #1927, it seems that SpotBugs does not do the same analysis on the StringBuilder class.