Skip to content

Commit fff6740

Browse files
Guard against NPE that may arise due to re-entrancy (#4665)
1 parent e76e46e commit fff6740

File tree

1 file changed

+2
-0
lines changed
  • org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast

1 file changed

+2
-0
lines changed

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Annotation.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,8 @@ public static void isTypeUseCompatible(TypeReference reference, Scope scope, Ann
13771377

13781378
nextAnnotation:
13791379
for (Annotation annotation : annotations) {
1380+
if (annotation.resolvedType == null) // barked elsewhere or still cooking and we come here due to re-entrancy
1381+
continue;
13801382
long metaTagBits = annotation.resolvedType.getAnnotationTagBits();
13811383
if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0 && (metaTagBits & TagBits.AnnotationForDeclarationMASK) == 0) {
13821384
ReferenceBinding currentType = (ReferenceBinding) resolvedType;

0 commit comments

Comments
 (0)