Back to Intellij Community

GroovyEmptySyncBlock

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyEmptySyncBlock.html

2025.3-rc-2218 B
Original Source

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.

Example:

synchronized(lock) {
}