EmptyFinallyBlock

Avoid empty finally blocks - these can be deleted.

This rule is defined by the following XPath expression:


//FinallyStatement[count(Block/BlockStatement) = 0]
 
              

Example:

                
  
public class Foo {
 public void bar() {
  try {
    int x=2;
   } finally {
    // empty!
   }
 }
}