Java logoJava/
JAVA-S0267

Static initializer creates instance before all static final fields are assignedJAVA-S0267

Critical severityCritical
Bug Risk categoryBug Risk

The class's static initializer creates an instance of the class before all of the static final fields are assigned.

This may easily lead to a scenario where the static instance of this class may be used while in a partially constructed state.

Reorder the creation of the static instance so that it occurs after all other fields (static or not) are initialized.