...
Similarly, it is inappropriate to lock on an object of a class that implements either the Lock
or Condition
interfaces interface (or both) of package java.util.concurrent.locks
. This problem usually comes up in practice when refactoring from intrinsic locking to the java.util.concurrent
dynamic locking utilities.
...