Empty synchronized blocks suspend execution until a lock can be acquired, which is then released immediately. This is unlikely to achieve the desired effect and may indicate the presence of incomplete code or incorrect synchronization. It may also lead to concurrency problems.

Check which code needs to be synchronized. Any code that requires synchronization on the given lock should be placed within the synchronized block.

  • Java Language Specification: The synchronized Statement.
  • The Java Tutorials: Synchronization.