Package net.sourceforge.pmd.lang.java.rule.strings

Class Summary
AppendCharacterWithCharRule This rule finds the following:

AvoidDuplicateLiteralsRule  
AvoidDuplicateLiteralsRule.ExceptionParser  
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

example:

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 See http://sourceforge.net/forum/forum.php?thread_id=1438119&forum_id=188194
StringInstantiationRule  
StringToStringRule  
UnnecessaryCaseChangeRule  
UseIndexOfCharRule  
UselessStringValueOfRule  
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-2015 InfoEther. All Rights Reserved.