aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-01-07 15:21:26 +0000
committeracolyer <acolyer>2004-01-07 15:21:26 +0000
commit01055e854df883746321b955bd5b9b41a840feda (patch)
treed13cdfae53c05904088d4dcb60f2d4917c150c60 /org.aspectj.ajdt.core
parenteac16aee966695c8f0d22c4961c63a27e61dd2bf (diff)
downloadaspectj-01055e854df883746321b955bd5b9b41a840feda.tar.gz
aspectj-01055e854df883746321b955bd5b9b41a840feda.zip
fix for pr 48522, not warning on (un)softened exception
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java8
1 files changed, 8 insertions, 0 deletions
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 dd708a1b7..49b726db2 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
@@ -32,6 +32,7 @@ import org.eclipse.jdt.internal.compiler.ast.AstNode;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
@@ -71,6 +72,13 @@ public class AjProblemReporter extends ProblemReporter {
for (Iterator i = world.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
DeclareSoft d = (DeclareSoft)i.next();
+ // We need the exceptionType to match the type in the declare soft statement
+ // This means it must either be the same type or a subtype
+ ResolvedTypeX throwException = world.fromEclipse((ReferenceBinding)exceptionType);
+ FuzzyBoolean isExceptionTypeOrSubtype =
+ d.getException().matchesInstanceof(throwException);
+ if (!isExceptionTypeOrSubtype.alwaysTrue() ) continue;
+
if (callSite != null) {
FuzzyBoolean match = d.getPointcut().match(callSite);
if (match.alwaysTrue()) {