Synopsis: | Combine StringBuffer.append calls, if possible |
Language: | Java |
Severity Level: | 4 |
Category: | StringandStringBuffer |
Description: |
Consecutively calling StringBuffer.append with String literalspublic class Foo { private void bar() { StringBuffer buf = new StringBuffer(); buf.append("Hello").append(" ").append("World"); //bad buf.append("Hello World");//good } } |