Skip to content

Files

Latest commit

 

History

History
22 lines (15 loc) · 495 Bytes

EmptySynchronizedStatement.md

File metadata and controls

22 lines (15 loc) · 495 Bytes

Pattern: Empty synchronized statement

Issue: -

Description

Checks for empty synchronized statements. Empty synchronized statements are confusing and serve no purpose.

Here is an example of code that produces a violation:

class SomeClass {
    def someMethod() {
        synchronized(lock) {
        }
    }
}

Further Reading