GLOBAL.UPPM
Avoid globally unused "public"/"protected" methods
Description
This rule flags any globally unused "public"/"protected" method.
Using Global Static Analysis, Jtest can detect if "public"/"protected" fields/methods/classes are not used by any class.
These unused entities usually point to either:
- Old code that is no longer needed and which makes the class more difficult to understand.
- A logical flaw if the entity needs to be used, but other classes incorrectly avoid using it.
Example
See examples/static/GLOBAL/unused.
Repair
Remove the unused field/method/class or document the reason for its existence.
|