Issue #11374: Fix false positive related to anon inner classes in UnusedLocalVariableCheck
Resolves #11374
Diff Regression config: https://gist.githubusercontent.com/romani/e93272bbd35d686c134d5e6197322096/raw/4d9182b034271dcab66f9d497c5d04737715119d/config-pull-12795.xml
single check config: https://gist.githubusercontent.com/Vyom-Yadav/98dceb63a79f4833e85fff9b2e1464a6/raw/113875d5a22338b01bac435d7dae45446e6e1d2b/my_checks.xml
Final Report (clean): https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/3e532cd_2023140921/reports/diff/index.html
Github, generate report
https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/3e532cd_2023140921/reports/diff/index.html
Please recheck CI failures
@nrmancuso @romani @rnveach Let's get this in the review stage. Only cosmetic changes have been made to FinalClassCheck.
usage of existing method:

@Vyom-Yadav , your report is only on UnusedLocalVariable but you change two classes. please put in regression config both classes.
your report is only on UnusedLocalVariable but you change two classes. please put in regression config both classes.
I have made changes to both but changes to FinalClassCheck are non functional changes, there was a util method used by both FinalClass and UnusedLocalVar but now it is only used by FinalClass so it was moved out of util. Similarily there was a method in FinalClass that is now used by both FinalClass and UnusedLocalVar so it was moved to util.
No functional changes have been made to FinalClassCheck.
@Vyom-Yadav, please finish or abandon PR.
Github, generate report
Report generation failed on phase "parse_body",
step "Parsing content of PR description".
Link: https://github.com/checkstyle/checkstyle/actions/runs/7065950949
Report generation failed on phase "parse_body",
step "Parsing content of PR description".
Link: https://github.com/checkstyle/checkstyle/actions/runs/7065950949
Github, generate report
https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/4183859_2023233132/reports/diff/index.html