AvoidFieldNameMatchingTypeName
What this rule checks
No field named after the class it's in (e.g. a field score in class Score)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
Overview
| Category | Topic Classes |
| Level | Advanced |
| Type | Built-in PMD |
| Priority | 3 (1 = highest, 5 = lowest) |
| Status | Active |
PMD Configuration
| PMD reference | category/java/errorprone.xml/AvoidFieldNameMatchingTypeName |