CodeQL documentation

Unused classes and interfaces

ID: java/unused-reference-type
Kind: problem
Security severity: 
Severity: recommendation
Precision: high
Tags:
   - maintainability
   - useless-code
   - external/cwe/cwe-561
Query suites:
   - java-security-and-quality.qls

Click to see the query in the CodeQL repository

A non-public class or interface that is not used anywhere in the program may cause a programmer to waste time and effort maintaining and documenting it.

Recommendation

Ensure that redundant types are removed from the program.

References

  • © GitHub, Inc.
  • Terms
  • Privacy