]> source.dussan.org Git - aspectj.git/commitdiff
fix for 138143: npe on duplicate method for ataj
authoraclement <aclement>
Mon, 24 Apr 2006 08:44:25 +0000 (08:44 +0000)
committeraclement <aclement>
Mon, 24 Apr 2006 08:44:25 +0000 (08:44 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java

index 18380cbe60be7299ed3505f4b5ea74b458a0cee6..6ce6ceab0711b8602d3ee11cfd21a518d3fa069d 100644 (file)
@@ -186,7 +186,7 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
                                }  else if ((amd.annotations != null) && isAnnotationStylePointcut(amd.annotations)) {
                                        // consider pointcuts defined via annotations
                                        ResolvedPointcutDefinition df = makeResolvedPointcutDefinition(amd);
-                                       declaredPointcuts.add(df);
+                                       if (df!=null) declaredPointcuts.add(df);
                                } else {
                                        if (amd.binding == null || !amd.binding.isValidBinding()) continue;
                                        ResolvedMember member = factory.makeResolvedMember(amd.binding);
@@ -214,6 +214,7 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
        }
 
        private ResolvedPointcutDefinition makeResolvedPointcutDefinition(AbstractMethodDeclaration md) {
+               if (md.binding==null) return null; // there is another error that has caused this... pr138143
                ResolvedPointcutDefinition resolvedPointcutDeclaration = new ResolvedPointcutDefinition(
             factory.fromBinding(md.binding.declaringClass), 
             md.modifiers,