ZaheerAhmad created HBASE-30319:
-----------------------------------
Summary: Remove unused private fields flagged by new
UnusedPrivateFieldCheck#Checkstyle
Key: HBASE-30319
URL: https://issues.apache.org/jira/browse/HBASE-30319
Project: HBase
Issue Type: Improvement
Components: build
Reporter: ZaheerAhmad
While testing a new checkstyle check, UnusedPrivateFieldCheck (currently
under review upstream in checkstyle/checkstyle#19816), a small number of
unused private fields were identified in the HBase codebase.
The check flags private fields that are declared but never referenced
anywhere in the file — a common source of dead code in large, long-lived
codebases. It accounts for common false-positive sources (reflection-based
frameworks, Lombok, DI annotations, etc. via a configurable
ignoreAnnotationCanonicalNames property) and ignores well-known
naming conventions such as serialVersionUID by default via
ignoredFieldNames.
Each flagged field was manually verified as genuinely unused before
removal — not referenced via reflection, annotations, or any other
indirect means.
This cleanup also serves as real-world signal for the check's development
upstream; feedback on false positives, edge cases, or HBase-specific
naming conventions is welcome and will help shape the check before it's
finalized.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)