aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-04-04 12:33:45 -0700
committerAndy Clement <aclement@gopivotal.com>2014-04-04 12:33:45 -0700
commit331399f82b33cc4cff8239aab18e405dfe0dd2b9 (patch)
tree4ccddf5fe4e75a25ca48d53ad7d1d55aed935081 /tests
parent4ffb0fd285609fa955450964e54fc3f8fd2996ad (diff)
downloadaspectj-331399f82b33cc4cff8239aab18e405dfe0dd2b9.tar.gz
aspectj-331399f82b33cc4cff8239aab18e405dfe0dd2b9.zip
Fix 431976: thisJoinPoint considered uninitialized variable
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs180/pr431976/Code.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc180/ajc180.xml4
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs180/pr431976/Code.java b/tests/bugs180/pr431976/Code.java
new file mode 100644
index 000000000..a58ea4ecc
--- /dev/null
+++ b/tests/bugs180/pr431976/Code.java
@@ -0,0 +1,10 @@
+import org.aspectj.lang.annotation.SuppressAjWarnings;
+
+privileged aspect BugThisJoinPoint {
+
+ @SuppressAjWarnings("adviceDidNotMatch")
+ void around(): execution(boolean forceFocus ()) {
+ thisJoinPoint.getThis();
+ }
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
index ea5d1c845..3da1f12b6 100644
--- a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc180Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testThisJoinPointNotInitialized_431976() {
+ runTest("thisJoinPoint not initialized");
+ }
+
public void testNullAnnotationMatching_431541() {
runTest("NullAnnotationMatching exception");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
index 0d1132de6..6f7b0c586 100644
--- a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
+++ b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
@@ -2,6 +2,10 @@
<suite>
+ <ajc-test dir="bugs180/pr431976" title="thisJoinPoint not initialized">
+ <compile options="-1.8" files="Code.java"/>
+ </ajc-test>
+
<ajc-test dir="bugs180/pr431541" title="NullAnnotationMatching exception">
<compile options="-1.8" files="Test.aj"/>
</ajc-test>