...
Because the the Helper
class is declared as public, it uses a private lock to handle synchronization in conformance with CON07 LCK00-J. Use private final lock objects to synchronize classes that may interact with untrusted code.
Exceptions
CON28-EX1: Classes that prevent partially initialized objects from being used may publish partially initialized objects. This may be implemented, for example, by setting a volatile
boolean
flag in the last statement of the initializing code and then ensuring this flag was set before allowing the execution of any class methods.
...