Jtest logo




Contents  Previous  Next  Index

GLOBAL.UPAF


Avoid globally unused package-private fields

Description

This rule flags any unused package-private field.

Using Global Static Analysis, Jtest can detect if non-"private" 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