Java

Java

Made by DeepSource

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

Bug risk
Critical

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.