aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs1921/github_285/Unwoven.java5
-rw-r--r--tests/bugs1921/github_285/aop.xml5
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java4
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml21
4 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs1921/github_285/Unwoven.java b/tests/bugs1921/github_285/Unwoven.java
new file mode 100644
index 000000000..131cbec84
--- /dev/null
+++ b/tests/bugs1921/github_285/Unwoven.java
@@ -0,0 +1,5 @@
+public class Unwoven {
+ public static void main(String[] args) {
+ System.out.println("Hello world");
+ }
+}
diff --git a/tests/bugs1921/github_285/aop.xml b/tests/bugs1921/github_285/aop.xml
new file mode 100644
index 000000000..05837da42
--- /dev/null
+++ b/tests/bugs1921/github_285/aop.xml
@@ -0,0 +1,5 @@
+<aspectj>
+ <weaver>
+ <include within="*"/>
+ </weaver>
+</aspectj>
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java
index a9dbeb5bb..40459ba8d 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java
@@ -19,6 +19,10 @@ public class Bugs1921Tests extends XMLBasedAjcTestCase {
runTest("same class woven concurrently in parallel-capable classloader");
}
+ public void testGitHub_285() {
+ runTest("shared cache negative test");
+ }
+
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Bugs1921Tests.class);
}
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml
index d5d4c1c69..975fa1c6c 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml
@@ -372,4 +372,25 @@
<ant file="ant.xml" target="same class woven concurrently in parallel-capable classloader" verbose="true"/>
</ajc-test>
+ <!--
+ https://github.com/eclipse-aspectj/aspectj/issues/285, AspectJ 1.9.21.2
+
+ See also org.aspectj.systemtest.ajc171.NewFeatures::testSharedCache. This is a quasi negative test missing back in
+ 1.7.2 when the shared cache was introduced.
+ -->
+ <ajc-test dir="bugs1921/github_285" title="shared cache negative test">
+ <compile files="Unwoven.java" options="-1.5"/>
+ <run class="Unwoven" ltw="aop.xml" usefullltw="true"
+ vmargs="-Daj.weaving.cache.enabled=true -Daj.weaving.cache.dir=./ -Daj.weaving.cache.impl=shared">
+ <stdout>
+ <line text="Hello world"/>
+ </stdout>
+ <!--
+ Nothing should be printed on stderr, especially no fatal NPE with message
+ 'Cannot read the array length because "b" is null' and subsequent ajcore.*.txt
+ -->
+ <stderr/>
+ </run>
+ </ajc-test>
+
</suite>