net.sourceforge.pmd.rules

Class UselessOperationOnImmutable

public class UselessOperationOnImmutable extends AbstractJavaRule

An operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself. The result of the operation is a new object. Therefore, ignoring the operation result is an error.
Method Summary
Objectvisit(ASTLocalVariableDeclaration node, Object data)

Method Detail

visit

public Object visit(ASTLocalVariableDeclaration node, Object data)