Class AppendCharacterWithCharRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

    public class AppendCharacterWithCharRule
    extends AbstractJavaRulechainRule
    This rule finds the following:
     StringBuffer.append("c"); // appends a single character
     

    It is preferable to use

    StringBuffer.append('c'); // appends a single character
    See Also:
    feature request #381 Single character StringBuffer.append
    • Constructor Detail

      • AppendCharacterWithCharRule

        public AppendCharacterWithCharRule()