Inspectopedia Help

Empty 'synchronized' block

Reports synchronized statements with empty bodies. While theoretically this may be the semantics intended, this construction is confusing, and often the result of a typo.


synchronized(lock) { }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Groovy, 233.SNAPSHOT

Last modified: 13 July 2023