Instance field used before initialization

Last modified: 03 December 2024

Reports instance 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 instance variables as uninitialized. Variables reported as initialized will always be initialized.

Use the Ignore if annotated by option to specify special annotations. The inspection will ignore fields annotated with one of these annotations.

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