forked from phoedos/pmd
Latest code from Andrew Glover
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1501 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -33,10 +33,15 @@ public class ExcessivePublicCountRule extends ExcessiveNodeCountRule {
|
||||
return this.getTallyOnAccessType((AccessNode)node.jjtGetParent());
|
||||
}
|
||||
/**
|
||||
* Method counts ONLY public class attributes
|
||||
* Method counts ONLY public class attributes which are not PUBLIC and
|
||||
* static- these usually represent constants....
|
||||
*/
|
||||
public Object visit(ASTFieldDeclaration node, Object data) {
|
||||
return this.getTallyOnAccessType(node);
|
||||
if(node.isFinal() && node.isStatic()){
|
||||
return new Integer(0);
|
||||
}else{
|
||||
return this.getTallyOnAccessType(node);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Method counts a node if it is public
|
||||
|
Reference in New Issue
Block a user