Class SimplifyBooleanExpressionCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class SimplifyBooleanExpressionCheck
    extends AbstractCheck

    Checks for overly complicated boolean expressions. Currently finds code like if (b == true), b || true, !false, etc.

    Rationale: Complex boolean logic makes code hard to understand and maintain.

    An example of how to configure the check is:

     <module name="SimplifyBooleanExpression"/>
     
    Author:
    lkuehne