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 Detail

      • UselessOperationOnImmutableRule

        public UselessOperationOnImmutableRule()