diff options
author | acolyer <acolyer> | 2004-09-08 12:04:49 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-09-08 12:04:49 +0000 |
commit | eca1429e79b3dc55c1f93ffbadb3e50eb9808d9c (patch) | |
tree | d0618572a7c870e847b2d79c855c0a59420f7054 /org.aspectj.ajdt.core | |
parent | 8e4d8980e45ba054e7d8e3e5e7ac3aca940d0758 (diff) | |
download | aspectj-eca1429e79b3dc55c1f93ffbadb3e50eb9808d9c.tar.gz aspectj-eca1429e79b3dc55c1f93ffbadb3e50eb9808d9c.zip |
fix for Bugzilla Bug 72157
declare soft can cause programs with invalid exception behaviour to be generated
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java | 7 |
1 files changed, 7 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 faa48170a..61270166d 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 @@ -33,6 +33,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument; +import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.ReferenceContext; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding; @@ -74,6 +75,12 @@ public class AjProblemReporter extends ProblemReporter { if (!factory.getWorld().getDeclareSoft().isEmpty()) { Shadow callSite = factory.makeShadow(location, referenceContext); Shadow enclosingExec = factory.makeShadow(referenceContext); + // PR 72157 - calls to super / this within a constructor are not part of the cons join point. + if ((callSite == null) && (enclosingExec.getKind() == Shadow.ConstructorExecution) + && (location instanceof ExplicitConstructorCall)) { + super.unhandledException(exceptionType, location); + return; + } // System.err.println("about to show error for unhandled exception: " + new String(exceptionType.sourceName()) + // " at " + location + " in " + referenceContext); |