Back to Intellij Community

GroovySynchronizationOnNonFinalField

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

2025.3-rc-2236 B
Original Source

Reports synchronized statements where the lock expression is a non-final field.

Such statements are unlikely to have useful semantics, as different threads may be locking on different objects even when operating on the same object.