aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1610/pr363962/Code.java18
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml11
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs1610/pr363962/Code.java b/tests/bugs1610/pr363962/Code.java
new file mode 100644
index 000000000..3c2d5c49a
--- /dev/null
+++ b/tests/bugs1610/pr363962/Code.java
@@ -0,0 +1,18 @@
+import org.aspectj.weaver.WeakClassLoaderReference;
+
+
+public class Code {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ try{
+ WeakClassLoaderReference wclref = new WeakClassLoaderReference(null);
+ System.out.println("OK");
+ }catch(Throwable npe){
+ System.out.println("KO");
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java b/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
index e0188f818..f71420923 100644
--- a/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
@@ -18,6 +18,11 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc1610Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public void testNPE_pr363962() {
+ runTest("pr363962");
+ }
+
public void testOffset0_bug324932() {
runTest("pr324932");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml b/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
index fc8c61a90..7dce456b7 100644
--- a/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
@@ -2,6 +2,17 @@
<suite>
+
+ <ajc-test dir="bugs1610/pr363962" title="pr363962">
+ <compile files="Code.java" options="-1.5"/>
+ <run class="Code">
+ <stdout>
+ <line text="OK"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+
<ajc-test dir="bugs1610/pr324932" title="pr324932">
<compile files="A.java" options="-1.5"/>
<compile files="X.aj" options="-1.5 -Xlint:ignore" />