]> source.dussan.org Git - aspectj.git/commitdiff
250091: test and fix
authoraclement <aclement>
Wed, 29 Oct 2008 00:36:36 +0000 (00:36 +0000)
committeraclement <aclement>
Wed, 29 Oct 2008 00:36:36 +0000 (00:36 +0000)
tests/bugs163/pr250091/Demo.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
tests/src/org/aspectj/systemtest/ajc163/ajc163.xml

diff --git a/tests/bugs163/pr250091/Demo.java b/tests/bugs163/pr250091/Demo.java
new file mode 100644 (file)
index 0000000..0e3f191
--- /dev/null
@@ -0,0 +1,26 @@
+import org.aspectj.lang.reflect.MethodSignature;
+
+class A<X> { }
+
+class Base {
+       public A<String> foo() { return null; }
+}
+
+public aspect Demo {
+       public A<String> Base.bar() { return null; }
+       public Base Base.baz() { return null; }
+               
+       before(): execution(* Base.*(..)) {
+               Class<?> cs = ((MethodSignature)thisJoinPointStaticPart.getSignature()).getReturnType();
+               System.out.format("%s (%b)%n",
+                               cs,
+                               ClassNotFoundException.class == cs);
+       }
+
+       public static void main(String[] arg) {
+               new Base().foo();
+               new Base().bar();
+               new Base().baz();
+       }
+}
+
index 9fab888d17ace1502a1d30fa77022ad079156695..b707e26b7b1ddd8e5d59b2f3369d59940c687aba 100644 (file)
@@ -18,6 +18,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testItdCCE_pr250091() {
+               runTest("itd cce");
+       }
+
+       // class A from java.net.URLClassLoader@1e4853f extends class java.lang.Object (false)
+       // class java.lang.ClassNotFoundException from null extends class java.lang.Exception (true)
+       // class Base from java.net.URLClassLoader@1e4853f extends class java.lang.Object (false)
+
        public void testBreakingRecovery_pr226163() {
                runTest("breaking recovery");
        }
index 519cf9fddc553b5455fb8b5ee43be7c16ff33a25..6b712f48998997f94ae88d1c6eefd5642a90762b 100644 (file)
@@ -2,6 +2,17 @@
 
 <suite>
 
+    <ajc-test dir="bugs163/pr250091" title="itd cce">
+      <compile files="Demo.java" options="-1.5"/>
+      <run class="Demo">
+        <stdout>
+          <line text="class A (false)"/>
+          <line text="class A (false)"/>
+          <line text="class Base (false)"/>
+        </stdout>
+      </run>
+    </ajc-test>
+    
     <ajc-test dir="bugs163/pr226163" title="breaking recovery">
       <compile files="Code.java" options="-1.5">
         <message kind="error" line="4" text="Syntax error"/>