aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-27 14:39:46 +0000
committeraclement <aclement>2004-08-27 14:39:46 +0000
commita5330382082fbb28a761421037901d6b277e966f (patch)
tree7a0193a2bc73f9331a17de6dcc9e53502a787b60 /tests/bugs
parent5e0876580b0e95dd06ca4342e233f9a5dceb33a5 (diff)
downloadaspectj-a5330382082fbb28a761421037901d6b277e966f.tar.gz
aspectj-a5330382082fbb28a761421037901d6b277e966f.zip
tests for Bugzilla Bug 70404
passing null to array arguments confuzes static join point signature.
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/pr70404/Main.java15
-rw-r--r--tests/bugs/pr70404/Main2.java13
-rw-r--r--tests/bugs/pr70404/MainAspect.java19
3 files changed, 47 insertions, 0 deletions
diff --git a/tests/bugs/pr70404/Main.java b/tests/bugs/pr70404/Main.java
new file mode 100644
index 000000000..01cff7a87
--- /dev/null
+++ b/tests/bugs/pr70404/Main.java
@@ -0,0 +1,15 @@
+package dk.infimum.aspectjtest;
+public class Main {
+
+ public static void main(String[] args) {
+ Main obj = new Main();
+ //Main m[] = new Main[3];
+
+ // swap following lines to change behavior
+ obj.test(null, null);
+ obj.test(null, new Main[]{});
+ }
+
+ void test(Main dummy, Main[] dummy2) {}
+
+}
diff --git a/tests/bugs/pr70404/Main2.java b/tests/bugs/pr70404/Main2.java
new file mode 100644
index 000000000..c18eec46c
--- /dev/null
+++ b/tests/bugs/pr70404/Main2.java
@@ -0,0 +1,13 @@
+package dk.infimum.aspectjtest;
+public class Main2 {
+
+ public static void main(String[] args) {
+ Main2 obj = new Main2();
+ // swap following lines to change behavior
+ obj.test(null, new Main2[]{});
+ obj.test(null, null);
+ }
+
+ void test(Main2 dummy, Main2[] dummy2) {}
+
+}
diff --git a/tests/bugs/pr70404/MainAspect.java b/tests/bugs/pr70404/MainAspect.java
new file mode 100644
index 000000000..ef1711d2d
--- /dev/null
+++ b/tests/bugs/pr70404/MainAspect.java
@@ -0,0 +1,19 @@
+import org.aspectj.lang.reflect.MethodSignature;
+
+public aspect MainAspect {
+
+ pointcut testcall(): execution(* test*(..));
+
+ before(): testcall() {
+ MethodSignature sig =
+ (MethodSignature) thisJoinPointStaticPart.getSignature();
+ System.out.println(sig);
+ Class[] params = sig.getParameterTypes();
+ for(int i=0;i<params.length;i++) {
+ Class cls = params[i];
+ String name = cls.getName();
+ System.out.println(" - " + name);
+ if (name.indexOf("ClassNotFoundException")!=-1) throw new RuntimeException("");
+ }
+ }
+}