Update pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/ClassNamingConventionsRule.java

Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
This commit is contained in:
sgnl-labs 2024-07-13 05:37:01 -07:00 committed by GitHub
parent 5f669fca31
commit f0a5930a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ public class ClassNamingConventionsRule extends AbstractNamingConventionsRule {
@Override @Override
public Object visit(ASTUserClass node, Object data) { 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); checkMatches(INNER_CLASS_REGEX, node, data);
} else if (node.getModifiers().isTest()) { } else if (node.getModifiers().isTest()) {
checkMatches(TEST_CLASS_REGEX, node, data); checkMatches(TEST_CLASS_REGEX, node, data);