aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-11-27 19:03:07 -0800
committerAndy Clement <aclement@pivotal.io>2019-11-27 19:03:07 -0800
commit4d6668df0ce64175c209333705f457ee47376ef0 (patch)
tree70208ed1df12c5d293a44b8a8073d218032ebd21 /tests/src
parentaccb931da432b000c34523fcc1da20e43d701a0d (diff)
downloadaspectj-4d6668df0ce64175c209333705f457ee47376ef0.tar.gz
aspectj-4d6668df0ce64175c209333705f457ee47376ef0.zip
Fix 550494
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java8
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml30
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
index ef674b404..338ca47e9 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
@@ -16,6 +16,14 @@ import junit.framework.Test;
*/
public class Ajc195Tests extends XMLBasedAjcTestCase {
+ public void testAtDecpNPE_code_550494() {
+ runTest("at decp npe - code");
+ }
+
+ public void testAtDecpNPE_anno_550494() {
+ runTest("at decp npe - anno");
+ }
+
public void testAvoidWeavingSwitchInfrastructure() {
runTest("avoid weaving switch infrastructure");
}
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
index 1084faf91..d9d679859 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
@@ -2,6 +2,36 @@
<suite>
+<ajc-test dir="bugs195/550494" vm="1.8" title="at decp npe - code">
+ <compile files="Application.java BaseClass.java SubClass.java DataSourceConnectionAspectCode.java" options="-1.8"/>
+ <run class="foo.Application">
+ <stdout>
+ <line text="Aspect should not kick in without ITD, but should with ITD"/>
+ <line text="execution(Connection foo.BaseClass.getConnection())"/>
+ <line text="execution(Connection foo.BaseClass.getConnection(String, String))"/>
+ <line text="Aspect should kick in"/>
+ <line text="execution(Connection foo.BaseClass.getConnection())"/>
+ <line text="execution(Connection foo.BaseClass.getConnection(String, String))"/>
+ </stdout>
+ </run>
+</ajc-test>
+
+
+<ajc-test dir="bugs195/550494" vm="1.8" title="at decp npe - anno">
+ <compile files="Application.java BaseClass.java SubClass.java DataSourceConnectionAspectAnno.java" options="-1.8"/>
+ <run class="foo.Application">
+ <stdout>
+ <line text="Aspect should not kick in without ITD, but should with ITD"/>
+ <line text="execution(Connection foo.BaseClass.getConnection())"/>
+ <line text="execution(Connection foo.BaseClass.getConnection(String, String))"/>
+ <line text="Aspect should kick in"/>
+ <line text="execution(Connection foo.BaseClass.getConnection())"/>
+ <line text="execution(Connection foo.BaseClass.getConnection(String, String))"/>
+ </stdout>
+ </run>
+</ajc-test>
+
+
<ajc-test dir="bugs195/333274" vm="1.8" title="around finally blocks and unlinking">
<compile files="Code.java" options="-showWeaveInfo -1.8 -XnoInline">
<message kind="weave" text="Join point 'method-call(void Code.print2(java.lang.String))' in Type 'Code' (Code.java:15) advised by around advice from 'Azpect' (Code.java:35)"/>