Jtest logo




Contents  Previous  Next  Index

GLOBAL.DPAM


Declare package-private methods as inaccessible as possible

Description

This rule flags any package-private method that is more accessible than is necessary.

Using Global Static Analysis, Jtest can detect if non-"private" fields/methods/classes can be made less accessible.

Making the fields/methods/classes as inaccessible as possible makes the code much more object-oriented and it is much easier to understand code dependencies.

Example

See examples/static/GLOBAL/too-accessible.

Repair

Change the method's accessibility or document the reason for the excessive accessibility.


Contents  Previous  Next  Index

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