]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 121575
authoraclement <aclement>
Wed, 21 Dec 2005 11:30:48 +0000 (11:30 +0000)
committeraclement <aclement>
Wed, 21 Dec 2005 11:30:48 +0000 (11:30 +0000)
tests/bugs150/pr121575.aj [new file with mode: 0644]
tests/java5/generics/tvars/Case1.aj [new file with mode: 0644]
tests/java5/generics/tvars/Case2.aj [new file with mode: 0644]
tests/java5/generics/tvars/Case3.aj [new file with mode: 0644]

diff --git a/tests/bugs150/pr121575.aj b/tests/bugs150/pr121575.aj
new file mode 100644 (file)
index 0000000..77d5593
--- /dev/null
@@ -0,0 +1,32 @@
+import java.io.*;
+
+aspect MyAspect {
+    before(): execution(* MyOtherClass.read()) { }
+}
+
+
+class MyClass<T,E> implements MyInterface<T> {
+
+    public static void main(String[] arg) { }
+
+    public T read() throws IOException {
+        return null;
+    }
+
+    public void exceptionDetected(E e) { }
+}
+
+
+interface MyInterface<T> {
+    public T read() throws IOException;
+}
+
+class MyOtherClass {
+    public void read() { }
+}
+
+public class pr121575 {
+       public static void main(String []argv) {
+               MyClass.main(null);
+       }
+}
\ No newline at end of file
diff --git a/tests/java5/generics/tvars/Case1.aj b/tests/java5/generics/tvars/Case1.aj
new file mode 100644 (file)
index 0000000..4c20382
--- /dev/null
@@ -0,0 +1,23 @@
+import java.lang.annotation.*;
+import java.io.*;
+
+aspect MyAspect {
+    before(): execution(* read(..)) { }
+}
+
+
+class MyClass<T extends String,E extends Number> implements MyInterface<T> {
+
+    public static void main(String[] arg) { }
+
+    public void read(T t) throws IOException {
+    }
+
+    public void exceptionDetected(E e) { }
+}
+
+
+interface MyInterface<T> {
+    public void read(T t) throws IOException;
+}
+
diff --git a/tests/java5/generics/tvars/Case2.aj b/tests/java5/generics/tvars/Case2.aj
new file mode 100644 (file)
index 0000000..c94dd23
--- /dev/null
@@ -0,0 +1,23 @@
+import java.lang.annotation.*;
+import java.io.*;
+
+aspect MyAspect {
+    before(): execution(* read(..)) { }
+}
+
+
+class MyClass<T extends String,E extends Number> implements MyInterface<E> {
+
+    public static void main(String[] arg) { }
+
+    public void read(E e) throws IOException {
+    }
+
+    public void exceptionDetected(E e) { }
+}
+
+
+interface MyInterface<T> {
+    public void read(T t) throws IOException;
+}
+
diff --git a/tests/java5/generics/tvars/Case3.aj b/tests/java5/generics/tvars/Case3.aj
new file mode 100644 (file)
index 0000000..57e87a5
--- /dev/null
@@ -0,0 +1,23 @@
+import java.lang.annotation.*;
+import java.io.*;
+
+aspect MyAspect {
+    before(): execution(* read(..)) { }
+}
+
+
+class MyClass<T extends String,E extends Number> implements MyInterface<T> {
+
+    public static void main(String[] arg) { }
+
+    public void read(E e) throws IOException {
+    }
+
+    public void exceptionDetected(E e) { }
+}
+
+
+interface MyInterface<T> {
+    public void read(T t) throws IOException;
+}
+