Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: incl. Condition objects in items not to synch on

...

Code Block
bgColor#ccccff
final Lock lock = new ReentrantLock();
lock.lock();
try {
  // ...
} finally {
  lock.unlock();
}

It is recommended to not use the intrinsic locks on Lock or Condition objects.

Noncompliant Code Example (collection view)

...