aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-10-29 00:36:36 +0000
committeraclement <aclement>2008-10-29 00:36:36 +0000
commit85347bfd6fb121e086d3e0659cae668b5f3eaf51 (patch)
tree505ad34d0785592893bc35c16863167817eba58a
parent05529d854bdacb2f8c1853ec7a913291cad9e373 (diff)
downloadaspectj-85347bfd6fb121e086d3e0659cae668b5f3eaf51.tar.gz
aspectj-85347bfd6fb121e086d3e0659cae668b5f3eaf51.zip
250091: test and fix
-rw-r--r--tests/bugs163/pr250091/Demo.java26
-rw-r--r--tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc163/ajc163.xml11
3 files changed, 45 insertions, 0 deletions
diff --git a/tests/bugs163/pr250091/Demo.java b/tests/bugs163/pr250091/Demo.java
new file mode 100644
index 000000000..0e3f191b0
--- /dev/null
+++ b/tests/bugs163/pr250091/Demo.java
@@ -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();
+ }
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
index 9fab888d1..b707e26b7 100644
--- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
@@ -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");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
index 519cf9fdd..6b712f489 100644
--- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
+++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
@@ -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"/>