Class EmptyStatementCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class EmptyStatementCheck
    extends AbstractCheck

    Detects empty statements (standalone ';'). Empty statements often introduce bugs that are hard to spot, such as in

     if (someCondition);
       doConditionalStuff();
     doUnconditionalStuff();
     

    An example of how to configure the check is:

     <module name="EmptyStatement"/>
     
    Author:
    Rick Giles