Skip to content

Commit 8b38c70

Browse files
committed
Merge pull request androidannotations#1283 from WonderCsabo/1207_skipProcessingWhenHolderIsNull
Skip processing annotation when holder is null
2 parents f5de7e7 + d99e7cb commit 8b38c70

File tree

1 file changed

+8
-1
lines changed
  • AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/process

1 file changed

+8
-1
lines changed

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/process/ModelProcessor.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ public ProcessResult process(AnnotationElements validatedModel) throws Processin
126126
*/
127127
if (!isAbstractClass(enclosingElement)) {
128128
GeneratedClassHolder holder = processHolder.getGeneratedClassHolder(enclosingElement);
129-
processThrowing(annotationHandler, annotatedElement, holder);
129+
130+
/*
131+
* The holder can be null if the annotated holder class is
132+
* already invalidated.
133+
*/
134+
if (holder != null) {
135+
processThrowing(annotationHandler, annotatedElement, holder);
136+
}
130137
} else {
131138
LOGGER.trace("Skip element {} because enclosing element {} is abstract", annotatedElement, enclosingElement);
132139
}

0 commit comments

Comments
 (0)