diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/CouplingBetweenObjectsRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/CouplingBetweenObjectsRule.java index 59227777e6..dfea612724 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/CouplingBetweenObjectsRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/CouplingBetweenObjectsRule.java @@ -106,7 +106,7 @@ public class CouplingBetweenObjectsRule extends AbstractJavaRule { * @param typeNode The variable type. */ private void checkVariableType(ASTType typeNode) { - if (inInterface) { + if (inInterface || typeNode == null) { return; } // if the field is of any type other than the class type