From: aclement Date: Wed, 19 Mar 2008 23:34:39 +0000 (+0000) Subject: 173602 : testcode and fix for duplicate ITDs and NPE X-Git-Tag: V1_6_0rc1~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a370e866856f56916cd7816b41b936f75a3e338;p=aspectj.git 173602 : testcode and fix for duplicate ITDs and NPE --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java index b589499df..cedc82c4d 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java @@ -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)) { diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java index 437cfcb83..70a8c3896 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java @@ -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); + } + + }