This rule finds the following:
Original rule was written with XPath, but didn't verify whether the two calls to append would have been done on the same variable.
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:
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 See http://sourceforge.net/forum/forum.php?thread_id=1438119&forum_id=188194
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.