aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-08-08 00:26:22 +0000
committerjhugunin <jhugunin>2003-08-08 00:26:22 +0000
commitefc1cc47398443b33fe90da11c4cf1d14dc9c108 (patch)
tree9c967c62b6b4b51003b282976f2558ee7914cb91 /tests/bugs
parentbdfba603c4aee6d32a4873ddca43657e6eee92a8 (diff)
downloadaspectj-efc1cc47398443b33fe90da11c4cf1d14dc9c108.tar.gz
aspectj-efc1cc47398443b33fe90da11c4cf1d14dc9c108.zip
fix for Bugzilla Bug 41175
binary aspect-declared methods conflict, lost their exception clauses larger fix to address more issues with aspect-declared methods in bytecode form also addressed declared exception issue more generally this fix should be more stable than a smaller hack that just fixed this specific bug report would have been. added a few tests to match increased scope.
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/DeclaredExceptions.java28
-rw-r--r--tests/bugs/interfaceLibrary/lib.jarbin1310 -> 1410 bytes
-rw-r--r--tests/bugs/interfaceLibrary/libClass.jarbin1485 -> 1531 bytes
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/bugs/DeclaredExceptions.java b/tests/bugs/DeclaredExceptions.java
new file mode 100644
index 000000000..9baec0c15
--- /dev/null
+++ b/tests/bugs/DeclaredExceptions.java
@@ -0,0 +1,28 @@
+import java.lang.reflect.Method;
+import java.io.*;
+import org.aspectj.testing.Tester;
+
+public class DeclaredExceptions {
+ public static void main(String[] args) throws Exception {
+ Class c = C.class;
+ Method m = c.getDeclaredMethod("m", new Class[0]);
+ Tester.checkEqual(m.getExceptionTypes().length, 1);
+ Tester.checkEqual(m.getExceptionTypes()[0], IOException.class);
+
+ c = I.class;
+ m = c.getDeclaredMethod("m", new Class[0]);
+ Tester.checkEqual(m.getExceptionTypes().length, 1);
+ Tester.checkEqual(m.getExceptionTypes()[0], IOException.class);
+ }
+}
+
+interface I {}
+
+class C {}
+
+aspect A {
+ public void C.m() throws IOException {
+ }
+
+ public void I.m() throws IOException { }
+} \ No newline at end of file
diff --git a/tests/bugs/interfaceLibrary/lib.jar b/tests/bugs/interfaceLibrary/lib.jar
index 496514a29..57acb6aad 100644
--- a/tests/bugs/interfaceLibrary/lib.jar
+++ b/tests/bugs/interfaceLibrary/lib.jar
Binary files differ
diff --git a/tests/bugs/interfaceLibrary/libClass.jar b/tests/bugs/interfaceLibrary/libClass.jar
index 720435d62..ee68ce1c0 100644
--- a/tests/bugs/interfaceLibrary/libClass.jar
+++ b/tests/bugs/interfaceLibrary/libClass.jar
Binary files differ