Browse Source

Add null check to AjLookupEnvironment.hasAspectDeclarations

Fixes #240.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_20
Alexander Kriegisch 11 months ago
parent
commit
7fb9f8690c

+ 2
- 0
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java View File

@@ -1472,6 +1472,8 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
}

private static boolean hasAspectDeclarations(CompilationUnitDeclaration unit) {
if (unit.types == null)
return false;
for (int j = 0; j < unit.types.length; j++) {
if (unit.types[j] instanceof AspectDeclaration) {
return true;

Loading…
Cancel
Save