Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 495 Bytes

AvoidFieldNameMatchingTypeName.md

File metadata and controls

14 lines (12 loc) · 495 Bytes

AvoidFieldNameMatchingTypeName

Category: pmd
Rule Key: pmd:AvoidFieldNameMatchingTypeName

⚠️ This rule is deprecated in favour of S1700.


It is somewhat confusing to have a field name matching the declaring class name. This probably means that type and or field names could be more precise. Example :

public class Foo extends Bar {
  // There's probably a better name for foo
  int foo;
}