
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.rules.UnusedPrivateFieldRule
Example:
public class Something {
private static int FOO = 2; // Unused
private int i = 5; // Unused
private int j = 6;
public int addOne() {
return j++;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy