Package net.sourceforge.pmd.lang.java.rule.performance
package net.sourceforge.pmd.lang.java.rule.performance
-
ClassesClassDescriptionThis rule finds the following:Rule that marks instantiations of new
BigIntegerorBigDecimalobjects, when there is a well-known constant available, such asBigInteger.ZERO.This rule finds concurrent calls to StringBuffer/Builder.append where String literals are used.This rule finds code which inefficiently determines empty strings.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.This rule finds StringBuffers which may have been pre-sized incorrectly.Detects redundant field initializers, i.e. the field initializer expressions the JVM would assign by default.