I get several
String.indexOf(char) is faster than String.indexOf
(String)
warnings for code like this:
index = result.indexOf("{"+pkey.trim()+"?", index);
It seems that the subsequent string concatenation is
not taken into account. Should check for a
trailing '+' sign.
Logged In: YES
user_id=5159
Right you are, thanks for the report! Here's a
representative snippet:
==================
public class Bar {
void foo(String result) {
int index = result.indexOf("{" + bar, index);
}
}
==================
Assigning this back to me since I wrote this rule...
Thanks for the report,
Tom
http://pmdapplied.com/
Logged In: YES
user_id=5159
Fixed in CVS, and you can download a new pmd-3.5.jar file here:
http://infoether.com/~tom/pmd-3.5.jar
that contains that fix.
Thanks for the report,
Tom
Using PMD? Get the book! http://pmdapplied.com/