Project: AspectJ
Bug 308386 NPE when hasfield evaluating with annotations and there is an unresolved import
Reported: 2010-04-07 15:15:51 | Status: resolved fixed

hasfield/hasmethod can cause early matching - before the weaving process kicks in properly. For a 'normal' compile error, like an unresolvable import, the error is put out before the weaving process kicks off. However hasfield/hasmethod happening early causes an NPE to occur before the error is put out. A guard for the NPE (which occurs in EclipseResolvedMember.getAnnotationTypes()) addresses this problem and allows the real error to come out.

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java