
resources.report.rules.pmd.EmptyFinallyBlock.html Maven / Gradle / Ivy
EmptyFinallyBlock
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!
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy