aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2009-02-01 03:47:22 +0000
committeraclement <aclement>2009-02-01 03:47:22 +0000
commitc0b181cf7501f22c9babf078d1d7343c07b3a8ca (patch)
tree761c06efc7c7178e49dcb2a4c03d484f33519bd7 /org.aspectj.matcher
parent01c599be6992b542217eb82882d56ec373a23c9c (diff)
downloadaspectj-c0b181cf7501f22c9babf078d1d7343c07b3a8ca.tar.gz
aspectj-c0b181cf7501f22c9babf078d1d7343c07b3a8ca.zip
148285: test and fixes
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
index 7d62ae8ab..e1cc54341 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.aspectj.weaver.patterns;
+import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ResolvedPointcutDefinition;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
@@ -36,7 +37,13 @@ public class PerThisOrTargetPointcutVisitor extends AbstractPatternNodeVisitor {
}
public TypePattern getPerTypePointcut(Pointcut perClausePointcut) {
- return (TypePattern) perClausePointcut.accept(this, perClausePointcut);
+ Object o = perClausePointcut.accept(this, perClausePointcut);
+ if (o instanceof TypePattern) {
+ return (TypePattern) o;
+ } else {
+ throw new BCException("perClausePointcut visitor did not return a typepattern, it returned " + o
+ + (o == null ? "" : " of type " + o.getClass()));
+ }
}
// -- visitor methods, all is like Identity visitor except when it comes to transform pointcuts