Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

According to Joshua Bloch [Bloch 2008]

If a method modifies a static field, you must synchronize access to this field, even if the method is typically used only by a single thread. It is not possible for clients to perform external synchronization on such a method because there can be no guarantee that unrelated clients will do likewise.

...

MITRE CWE

CWE-820. Missing synchronization

Bibliography

[API 2006]

 

[Bloch 2008]

Item 67. Avoid excessive synchronization

...

      Rule 09: Locking (LCK)Image Added