Use String.indexOf(char) when checking for the index of a single character; it executes faster.public class Foo { void bar() { String s = "hello world"; // avoid this if (s.indexOf("d") {} // instead do this if (s.indexOf('d') {} } }Additional info can be found at this http://pmd.sourceforge.net/rules/strings.html#UseIndexOfChar site.
| 3 | org.jcoderz.commons.connector.http.transport.ClientHandler |
| [284:29], [288:27], [429:25] | |