INIT.SF
Explicitly initialize all "static" fields
Description
This rule flags any uninitialized static field in your methods.
Example
package INIT;
class SF
{
SF () {}
static private int K;
static private int L; // 'L' is not initialized
static {
K = 10;
}
}
Repair
These errors can be corrected by initializing the appropriate static field.
|