summaryrefslogtreecommitdiffstats
path: root/weaver/src
diff options
context:
space:
mode:
authoraclement <aclement>2009-01-30 22:20:15 +0000
committeraclement <aclement>2009-01-30 22:20:15 +0000
commit04509cc64423b8e34e3ef44396557ace8073df9e (patch)
tree836d90555ae8c21865769393211bf0fc7b0660b2 /weaver/src
parentedafd55ed6eb5a20b160c798c7f5523f44498e62 (diff)
downloadaspectj-04509cc64423b8e34e3ef44396557ace8073df9e.tar.gz
aspectj-04509cc64423b8e34e3ef44396557ace8073df9e.zip
262905: recursive non matching cflow pointcut: dont report rogue non-matches
Diffstat (limited to 'weaver/src')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java24
1 files changed, 9 insertions, 15 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index f207dd1d7..7ba56af66 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -54,6 +54,7 @@ import org.aspectj.bridge.context.ContextToken;
import org.aspectj.util.FileUtil;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.Advice;
+import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.AnnotationAJ;
import org.aspectj.weaver.AnnotationOnTypeMunger;
import org.aspectj.weaver.BCException;
@@ -1328,21 +1329,20 @@ public class BcelWeaver {
for (Iterator iter = l.iterator(); iter.hasNext();) {
ShadowMunger element = (ShadowMunger) iter.next();
- if (element instanceof BcelAdvice) { // This will stop us
- // incorrectly reporting
- // deow Checkers
+ // This will stop us incorrectly reporting deow checkers:
+ if (element instanceof BcelAdvice) {
BcelAdvice ba = (BcelAdvice) element;
+ if (ba.getKind() == AdviceKind.CflowEntry || ba.getKind() == AdviceKind.CflowBelowEntry) {
+ continue;
+ }
if (!ba.hasMatchedSomething()) {
// Because we implement some features of AJ itself by
// creating our own kind of mungers, you sometimes
// find that ba.getSignature() is not a BcelMethod - for
// example it might be a cflow entry munger.
if (ba.getSignature() != null) {
-
- // check we haven't already warned on this advice
- // and line
- // (cflow creates multiple mungers for the same
- // advice)
+ // check we haven't already warned on this advice and line
+ // (cflow creates multiple mungers for the same advice)
AdviceLocation loc = new AdviceLocation(ba);
if (alreadyWarnedLocations.contains(loc)) {
continue;
@@ -1353,13 +1353,7 @@ public class BcelWeaver {
if (!(ba.getSignature() instanceof BcelMethod)
|| !Utility.isSuppressing(ba.getSignature(), "adviceDidNotMatch")) {
world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(), new SourceLocation(
- element.getSourceLocation().getSourceFile(), element.getSourceLocation().getLine()));// element
- // .
- // getSourceLocation
- // (
- // )
- // )
- // ;
+ element.getSourceLocation().getSourceFile(), element.getSourceLocation().getLine()));
}
}
}