| Class | Description |
|---|---|
| AbstractOptimizationRule |
Base class with utility methods for optimization rules
|
| AppendCharacterWithCharRule |
This rule finds the following:
|
| AvoidInstantiatingObjectsInLoopsRule | |
| BigIntegerInstantiationRule |
Rule that marks instantiations of new
BigInteger or
BigDecimal objects, when there is a well-known constant available,
such as BigInteger.ZERO. |
| BooleanInstantiationRule |
Avoid instantiating Boolean objects; you can reference Boolean.TRUE,
Boolean.FALSE, or call Boolean.valueOf() instead.
|
| ConsecutiveAppendsShouldReuseRule |
Original rule was written with XPath, but didn't verify whether the two calls
to append would have been done on the same variable.
|
| ConsecutiveLiteralAppendsRule |
This rule finds concurrent calls to StringBuffer/Builder.append where String
literals are used It would be much better to make these calls using one call
to
.append |
| InefficientEmptyStringCheckRule |
This rule finds code which inefficiently determines empty strings.
|
| InefficientStringBufferingRule |
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.
|
| InsufficientStringBufferDeclarationRule |
This rule finds StringBuffers which may have been pre-sized incorrectly.
|
| RedundantFieldInitializerRule |
Detects redundant field initializers, i.e.
|
| StringInstantiationRule | |
| StringToStringRule | |
| UnnecessaryWrapperObjectCreationRule | |
| UseIndexOfCharRule | |
| UselessStringValueOfRule | |
| UseStringBufferForStringAppendsRule | |
| UseStringBufferLengthRule |
This rule finds places where StringBuffer.toString() is called just to see if
the string is 0 length by either using .equals("") or toString().length().
|
Copyright © 2002–2018 PMD. All rights reserved.