oops, NPE in previous commit...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6749 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
parent
0fb697a50b
commit
aea7c89175
@ -26,7 +26,11 @@ public class UseSingleton extends AbstractRule {
|
||||
int methodCount = 0;
|
||||
boolean isOK = false;
|
||||
while (i > 0) {
|
||||
Node n = decl.jjtGetChild(--i).jjtGetChild(0);
|
||||
Node n = decl.jjtGetChild(--i);
|
||||
if (n.jjtGetNumChildren() != 1) {
|
||||
break;
|
||||
}
|
||||
n = n.jjtGetChild(0);
|
||||
if (n instanceof ASTFieldDeclaration) {
|
||||
if (!((ASTFieldDeclaration) n).isStatic()) {
|
||||
isOK = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user