Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 438 Bytes

EmptyStatementBlock.md

File metadata and controls

20 lines (15 loc) · 438 Bytes

EmptyStatementBlock

Category: pmd
Rule Key: pmd:EmptyStatementBlock

⚠️ This rule is deprecated in favour of S108.


Empty block statements serve no purpose and should be removed. Example:

public class Foo {

   private int _bar;

   public void setBar(int bar) {
      { _bar = bar; } // Why not?
      {} // But remove this.
   }

}