Inspectopedia
 
2024.3

Synchronization on a 'Lock' object

Warning
New
Last modified: 03 December 2024

Reports synchronized blocks that lock on an instance of java.util.concurrent.locks.Lock. Such synchronization is almost certainly unintended, and appropriate versions of .lock() and .unlock() should be used instead.

Example: