Java

Java

Made by DeepSource

Synchronization performed on a util.concurrent Lock object JAVA-S0321

Anti-pattern
Critical

This method performs synchronization on an object that implements java.util.concurrent.locks.Lock.

Such an object is locked/unlocked using acquire()/release() rather than using the synchronized (...) construct.

Refactor the code to use the correct methods and constructs to achieve synchronization.