minor optimization

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4672 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Brian Remedios
2006-10-16 04:03:18 +00:00
parent 3e8266b96a
commit ee22ca56c2

View File

@ -30,8 +30,8 @@ public class BooleanInstantiation extends AbstractRule {
if (node.findChildrenOfType(ASTArrayDimsAndInits.class).size() > 0) {
return super.visit(node, data);
}
ASTClassOrInterfaceType type = (ASTClassOrInterfaceType) node.jjtGetChild(0);
if ("Boolean".equals(type.getImage()) || "java.lang.Boolean".equals(type.getImage())) {
String typeName = ((ASTClassOrInterfaceType) node.jjtGetChild(0)).getImage();
if ("Boolean".equals(typeName) || "java.lang.Boolean".equals(typeName)) {
super.addViolation(data, node);
return data;
}