Class InefficientStringBufferingRule

  • All Implemented Interfaces:
    JavaParserVisitor, net.sourceforge.pmd.lang.rule.ImmutableLanguage, net.sourceforge.pmd.properties.PropertySource, net.sourceforge.pmd.Rule

    public class InefficientStringBufferingRule
    extends AbstractJavaRule
    How this rule works: find additive expressions: + check that the addition is between anything other than two literals if true and also the parent is StringBuffer constructor or append, report a violation.
    Author:
    mgriffa
    • Constructor Detail

      • InefficientStringBufferingRule

        public InefficientStringBufferingRule()
    • Method Detail

      • isInStringBufferOperation

        protected static boolean isInStringBufferOperation​(net.sourceforge.pmd.lang.ast.Node node,
                                                           int length,
                                                           java.lang.String methodName)