aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-02-21 15:55:33 +0000
committeraclement <aclement>2006-02-21 15:55:33 +0000
commitba42a09551519a4b611ab06edb161ecb0c629f53 (patch)
tree2169f72dba31201d2c32fb6d39118c57e0869ef6 /tests
parent7a2087ef985e8af73045bac1e7e0195bb87c7f40 (diff)
downloadaspectj-ba42a09551519a4b611ab06edb161ecb0c629f53.tar.gz
aspectj-ba42a09551519a4b611ab06edb161ecb0c629f53.zip
test and fix for 128237 from Helen
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs151/pr128237.java29
-rw-r--r--tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc151/ajc151.xml4
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/bugs151/pr128237.java b/tests/bugs151/pr128237.java
new file mode 100644
index 000000000..93af416c8
--- /dev/null
+++ b/tests/bugs151/pr128237.java
@@ -0,0 +1,29 @@
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+class AbstractTracer
+{
+
+ @Pointcut("(execution(public * Foo.anotherMethod*(..)) || execution(public * Foo.methodA(..))) && this(obj)")
+ protected void methodExec(Object obj){};
+
+ @Before("methodExec(obj)")
+ public void beforeMethodExec(JoinPoint thisJoinPoint, Object obj) {
+ System.out.println("Before " + thisJoinPoint.getSignature().toString());
+ }
+
+}
+
+
+class Foo {
+
+ public void methodA() {
+ }
+
+ public void anotherMethod() {
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
index 0832c4a47..2672caa3e 100644
--- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
@@ -170,6 +170,10 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("@AJ declare parents retains field state");
}
+ public void testAtAspectNoNPEWithPcdContainingOrThisAndWildcard_pr128237() {
+ runTest("@AJ no npe with pointcut containing or, this and a wildcard");
+ }
+
/*
* Load-time weaving bugs and enhancements
*/
diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
index c76ccbac7..d340d0778 100644
--- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
+++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
@@ -208,6 +208,10 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs151" title="@AJ no npe with pointcut containing or, this and a wildcard">
+ <compile files="pr128237.java" options="-1.5"/>
+ </ajc-test>
+
<!-- New features down here... when they arent big enough to have their own test file -->
<ajc-test dir="features151/ptw" title="exposing withintype">