
resources.report.rules.pmd.AppendCharacterWithChar.html Maven / Gradle / Ivy
AppendCharacterWithChar
AppendCharacterWithChar
Avoid concatenating characters as strings in StringBuffer.append.
This rule is defined by the following Java class:
net.sourceforge.pmd.rules.strings.AppendCharacterWithChar
Example:
public class Foo {
void bar() {
StringBuffer sb=new StringBuffer();
// Avoid this
sb.append("a");
// use instead something like this
StringBuffer sb=new StringBuffer();
sb.append('a');
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy