From f0a5930a40f328a2025418c524bdf1c641aa3979 Mon Sep 17 00:00:00 2001 From: sgnl-labs Date: Sat, 13 Jul 2024 05:37:01 -0700 Subject: [PATCH] Update pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java Co-authored-by: Andreas Dangel --- .../lang/apex/rule/codestyle/ClassNamingConventionsRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 57fd2e7141..a937a9b933 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 @@ -58,7 +58,7 @@ public class ClassNamingConventionsRule extends AbstractNamingConventionsRule { @Override public Object visit(ASTUserClass node, Object data) { - if(node.getParent() != null && node.getParent() instanceof ASTUserClass) { + if (node.getParent() instanceof ASTUserClass) { checkMatches(INNER_CLASS_REGEX, node, data); } else if (node.getModifiers().isTest()) { checkMatches(TEST_CLASS_REGEX, node, data);