Private field 'nextTagName' could be made final; it is only initialized in the declaration or constructor. Open
private String nextTagName;
- Read upRead up
- Exclude checks
ImmutableField
Since: PMD 2.0
Priority: Medium
Categories: Style
Remediation Points: 50000
Identifies private fields whose values never change once they are initialized either in the declaration of the field or by a constructor. This helps in converting existing classes to becoming immutable ones.
Example:
public class Foo {
private int x; // could be final
public Foo() {
x = 7;
}
public void foo() {
int a = x + 2;
}
}
Private field 'abbrevCommitId' could be made final; it is only initialized in the declaration or constructor. Open
private String abbrevCommitId;
- Read upRead up
- Exclude checks
ImmutableField
Since: PMD 2.0
Priority: Medium
Categories: Style
Remediation Points: 50000
Identifies private fields whose values never change once they are initialized either in the declaration of the field or by a constructor. This helps in converting existing classes to becoming immutable ones.
Example:
public class Foo {
private int x; // could be final
public Foo() {
x = 7;
}
public void foo() {
int a = x + 2;
}
}
Private field 'distance' could be made final; it is only initialized in the declaration or constructor. Open
private int distance;
- Read upRead up
- Exclude checks
ImmutableField
Since: PMD 2.0
Priority: Medium
Categories: Style
Remediation Points: 50000
Identifies private fields whose values never change once they are initialized either in the declaration of the field or by a constructor. This helps in converting existing classes to becoming immutable ones.
Example:
public class Foo {
private int x; // could be final
public Foo() {
x = 7;
}
public void foo() {
int a = x + 2;
}
}