GLOBAL.DPAC
Declare package-private classes as inaccessible as possible
Description
This rule flags any package-private class that is more accessible than is necessary.
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 class's accessibility or document the reason for the excessive accessibility.
|