Avoid concatenating non literals in a StringBuffer constructor or append().public class Foo { void bar() { // Avoid this StringBuffer sb=new StringBuffer("tmp = "+System.getProperty("java.io.tmpdir")); // use instead something like this StringBuffer sb = new StringBuffer("tmp = "); sb.append(System.getProperty("java.io.tmpdir")); } }Additional info can be found at this http://pmd.sourceforge.net/rules/strings.html#InefficientStringBuffering site.
| 1 | org.jcoderz.phoenix.sqlparser.CreateIndexStatement |
| [101:22] | |