Class UselessOperationOnImmutableRule

All Implemented Interfaces:
AstVisitor, JavaVisitor, Rule, PropertySource

public class UselessOperationOnImmutableRule extends AbstractJavaRulechainRule
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.
  • Constructor Details

    • UselessOperationOnImmutableRule

      public UselessOperationOnImmutableRule()
  • Method Details