...
This compliant solution uses a static private final lock to protect the counter
field and, consequently, does not depend on any external synchronization. This solution also complies with CON04CON07-J. Use private final lock objects to synchronize classes that may interact with untrusted code.
...