Skip to content

Files

Latest commit

 

History

History
23 lines (16 loc) · 454 Bytes

EmptyFinallyBlock.md

File metadata and controls

23 lines (16 loc) · 454 Bytes

Pattern: Empty finally block

Issue: -

Description

Checks for empty finally blocks. Empty finally blocks are confusing and serve no purpose.

Here is an example of code that produces a violation:

def someMethod() {
    try {
        doSomething()
    } finally {
        // empty
    }
}

Further Reading