]> source.dussan.org Git - aspectj.git/commitdiff
363962
authoraclement <aclement>
Thu, 17 Nov 2011 21:20:08 +0000 (21:20 +0000)
committeraclement <aclement>
Thu, 17 Nov 2011 21:20:08 +0000 (21:20 +0000)
tests/bugs1610/pr363962/Code.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml

diff --git a/tests/bugs1610/pr363962/Code.java b/tests/bugs1610/pr363962/Code.java
new file mode 100644 (file)
index 0000000..3c2d5c4
--- /dev/null
@@ -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
index e0188f818b7104d94d89f3f6abfa9d21daf02369..f71420923c7e4cd40584b9883c89efde6bb3bea9 100644 (file)
@@ -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");
        }
index fc8c61a90105f08d5837b118acf5fa69ceadcd77..7dce456b79db31027918c6d0db5762ec3e7da838 100644 (file)
@@ -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" />