diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java index 5de5cb04151..ea16b08319b 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java @@ -10858,6 +10858,9 @@ private Annotation findAnnotation(Annotation[] annotations, int typeBit) { public void missingNonNullByDefaultAnnotation(TypeDeclaration type) { int severity; CompilationUnitDeclaration compUnitDecl = type.getCompilationUnitDeclaration(); + if (compUnitDecl == null) { + return; + } String[] arguments; if (compUnitDecl.currentPackage == null) { severity = computeSeverity(IProblem.MissingNonNullByDefaultAnnotationOnType);