aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-06-11 10:33:12 -0700
committerAndy Clement <aclement@gopivotal.com>2014-06-11 10:33:12 -0700
commit0cb32f4abac25e989766684b48d1cbd280916ba3 (patch)
tree06a089c21fd365cef6b9d9dc753a714be7f29159 /org.aspectj.ajdt.core
parent4f89239adb00058765f874be1e0800c5d40fa81c (diff)
downloadaspectj-0cb32f4abac25e989766684b48d1cbd280916ba3.tar.gz
aspectj-0cb32f4abac25e989766684b48d1cbd280916ba3.zip
Fix 431976: avoid uninitialized messages if tjp used in if
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java4
1 files changed, 3 insertions, 1 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 f795d617e..f9b26b59a 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
@@ -24,6 +24,7 @@ import java.util.Set;
import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.DeclareAnnotationDeclaration;
+import org.aspectj.ajdt.internal.compiler.ast.IfMethodDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.Proceed;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
@@ -518,7 +519,8 @@ public class AjProblemReporter extends ProblemReporter {
CharOperation.equals(binding.name, thisJoinPointStaticPartName) ||
CharOperation.equals(binding.name, thisEnclosingJoinPointStaticPartName)) {
// If in advice, this is not a problem
- if (binding.declaringScope!=null && binding.declaringScope.referenceContext() instanceof AdviceDeclaration) {
+ if (binding.declaringScope!=null && (binding.declaringScope.referenceContext() instanceof AdviceDeclaration ||
+ binding.declaringScope.referenceContext() instanceof IfMethodDeclaration)) {
return;
}
}