From 1a370e866856f56916cd7816b41b936f75a3e338 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 19 Mar 2008 23:34:39 +0000 Subject: [PATCH] 173602 : testcode and fix for duplicate ITDs and NPE --- .../compiler/ast/InterTypeMethodDeclaration.java | 2 ++ .../internal/compiler/problem/AjProblemReporter.java | 10 ++++++++++ 2 files changed, 12 insertions(+) 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); + } + + } -- 2.39.5