Inspectopedia
 
2024.3

Static field used before initialization

Warning
New
Last modified: 03 December 2024

Reports static variables that are read before initialization.

The inspection ignores equality checks with null.

Example:

Note that this inspection uses a very conservative dataflow algorithm and may incorrectly report static variables as uninitialized. Variables reported as initialized will always be initialized.

Use the Ignore primitive fields option to ignore uninitialized primitive fields.