resources.report.rules.pmd.UnusedPrivateField.html Maven / Gradle / Ivy
UnusedPrivateField
UnusedPrivateField
Detects when a private field is declared and/or assigned a value, but not used.
This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.unusedcode.UnusedPrivateFieldRule
Example(s):
public class Something {
private static int FOO = 2; // Unused
private int i = 5; // Unused
private int j = 6;
public int addOne() {
return j++;
}
}