Add missing null check.

This commit is contained in:
Will Winder
2018-10-08 09:33:25 -04:00
parent e58ad9ef84
commit 2acd68ddef

View File

@ -29,7 +29,7 @@ abstract class AbstractJavaAnnotatableNode extends AbstractJavaNode implements A
List<ASTAnnotation> annotations = getDeclaredAnnotations();
for (ASTAnnotation annotation : annotations) {
ASTName name = annotation.getFirstDescendantOfType(ASTName.class);
if (TypeHelper.isA(name, annotQualifiedName)) {
if (name != null && TypeHelper.isA(name, annotQualifiedName)) {
return annotation;
}
}