Jtest logo




Contents  Previous  Next  Index

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:

  1. Old code that is no longer needed and which makes the class more difficult to understand.
  2. 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.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft