View by Classes

Findings - Overview

info InefficientStringBuffering (PMD)

Avoid concatenating nonliterals in a StringBuffer constructor or append().

Further info on the wiki.
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.

1org.jcoderz.phoenix.sqlparser.CreateIndexStatement
 [101:22]