]> source.dussan.org Git - aspectj.git/commitdiff
173602 : testcode and fix for duplicate ITDs and NPE
authoraclement <aclement>
Wed, 19 Mar 2008 23:34:39 +0000 (23:34 +0000)
committeraclement <aclement>
Wed, 19 Mar 2008 23:34:39 +0000 (23:34 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java

index b589499df5bb0e7de86d8e022b6668b92edda88b..cedc82c4d81971368ca2d1605d7560cb504a8a94 100644 (file)
@@ -83,6 +83,8 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
        
        public void resolve(ClassScope upperScope) {
                if (munger == null) ignoreFurtherInvestigation = true;
+               if (binding == null)
+            ignoreFurtherInvestigation = true;
                if (ignoreFurtherInvestigation) return;
                
                if (!Modifier.isStatic(declaredModifiers)) {
index 437cfcb83e5d421cc93a859786256369c1839f18..70a8c38964dbc8993322cd3613694fb0b5a5ce9e 100644 (file)
@@ -580,4 +580,14 @@ public class AjProblemReporter extends ProblemReporter {
                public void setSupplementaryMessageInfo(String msg) { delegate.setSupplementaryMessageInfo(msg);}
                public String getSupplementaryMessageInfo() { return delegate.getSupplementaryMessageInfo();}
     }
+
+    public void duplicateMethodInType(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) {
+        if (new String(methodDecl.selector).startsWith("ajc$interMethod")) {
+            // this is an ITD clash and will be reported in another way by AspectJ (173602)
+            return;
+        }
+        super.duplicateMethodInType(type, methodDecl);
+    }
+
+
 }