diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java index 5685695742..57fd2e7141 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java @@ -73,7 +73,7 @@ public class ClassNamingConventionsRule extends AbstractNamingConventionsRule { @Override public Object visit(ASTUserInterface node, Object data) { - if(node.getParent() != null && node.getParent() instanceof ASTUserClassOrInterface) { + if (node.getParent() instanceof ASTUserClassOrInterface) { checkMatches(INNER_INTERFACE_REGEX, node, data); } else { checkMatches(INTERFACE_REGEX, node, data);