All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.report.rules.pmd.EmptyTryBlock.html Maven / Gradle / Ivy



EmptyTryBlock


EmptyTryBlock

Avoid empty try blocks - what's the point?

This rule is defined by the following XPath expression:


//TryStatement/Block[1][count(*) = 0]

              

Example:

                
  
public class Foo {
 public void bar() {
  try {
  } catch (Exception e) {
    e.printStackTrace();
  }
 }
}

      
            




© 2015 - 2025 Weber Informatics LLC | Privacy Policy