...
Fields declared static final
are also safe for multithreaded use (CON28TSM03-J. Do not publish partially initialized objects). On a cautionary note, however, simply changing the modifier to final
may not prevent attackers from indirectly retrieving an incorrect value from the static
final
variable before its initialization (see MSC07-J. Eliminate class initialization cycles). Individual members of the referenced object can also be changed if it is mutable (see OBJ01-J. Be aware that a final reference may not always refer to immutable data).
...