Skip to content

Move methods common in UnusedLocalVariableCheck and FinalClassCheck to util #11201

@Vyom-Yadav

Description

@Vyom-Yadav

From #10930 (comment)
To be addressed after merging #10930
UnusedLocalVariableCheck (#10930) and FinalClassCheck (Check + #10968) has some methods in common-

- extractQualifiedName(..)
- classNameMatchingCount(..)
- getQualifiedClassOrInterfaceName(DetailAST classAst) (known as `getQualifiedClassName` in final class)
- getQualifiedClassOrInterfaceName(String packageName, String outerClassQualifiedName, String className) (known as `getQualifiedClassName` in final class)

Also FinalClassCheck and UnusedLocalVariableCheck have a static nested class in common - ClassDesc. We may merge both of these classes and extract it somewhere, there are some overlapping properties.

When #10968 will be merged, extract these methods to util and try to remove the suppression for ExcessiveClassLength in UnusedLocalVariableCheck.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions