summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-16 16:16:20 +0000
committeraclement <aclement>2004-08-16 16:16:20 +0000
commit6b1ef0ff7cfd1dbb985993fd5486c9ddf31b280d (patch)
tree5b32bce26fe427aabe1d83d571f06a60f037d317 /tests/bugs
parent36e24edf8dfc3acbd35e7d93df2e52834cc15ac1 (diff)
downloadaspectj-6b1ef0ff7cfd1dbb985993fd5486c9ddf31b280d.tar.gz
aspectj-6b1ef0ff7cfd1dbb985993fd5486c9ddf31b280d.zip
Fixes for:
Bugzilla Bug 67578: Privileged Aspect Access Problem Across Packages Bugzilla Bug 67579: NPE on privileged aspect error
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/privilegedAccess/a/ITD.aj6
-rw-r--r--tests/bugs/privilegedAccess/b/B.aj13
-rw-r--r--tests/bugs/privilegedAccess/b/B_notPrivileged.aj13
-rw-r--r--tests/bugs/privilegedNPE/B.aj11
-rw-r--r--tests/bugs/privilegedNPE/ITD.aj5
-rw-r--r--tests/bugs/privilegedNPE/a/ITD.aj6
-rw-r--r--tests/bugs/privilegedNPE/b/B.aj13
7 files changed, 67 insertions, 0 deletions
diff --git a/tests/bugs/privilegedAccess/a/ITD.aj b/tests/bugs/privilegedAccess/a/ITD.aj
new file mode 100644
index 000000000..47009cd8c
--- /dev/null
+++ b/tests/bugs/privilegedAccess/a/ITD.aj
@@ -0,0 +1,6 @@
+package a;
+
+public class ITD {
+ private void returnNothing(Object a) {
+ }
+} \ No newline at end of file
diff --git a/tests/bugs/privilegedAccess/b/B.aj b/tests/bugs/privilegedAccess/b/B.aj
new file mode 100644
index 000000000..46f2b1a68
--- /dev/null
+++ b/tests/bugs/privilegedAccess/b/B.aj
@@ -0,0 +1,13 @@
+package b;
+
+import a.*;
+
+privileged aspect B {
+ public void ITD.newFun() {
+ returnNothing("a");
+ }
+
+ public static void main(String [] argv) {
+ new ITD().newFun();
+ }
+}
diff --git a/tests/bugs/privilegedAccess/b/B_notPrivileged.aj b/tests/bugs/privilegedAccess/b/B_notPrivileged.aj
new file mode 100644
index 000000000..9ba5e9142
--- /dev/null
+++ b/tests/bugs/privilegedAccess/b/B_notPrivileged.aj
@@ -0,0 +1,13 @@
+package b;
+
+import a.*;
+
+aspect B {
+ public void ITD.newFun() {
+ returnNothing("a");
+ }
+
+ public static void main(String [] argv) {
+ new ITD().newFun();
+ }
+}
diff --git a/tests/bugs/privilegedNPE/B.aj b/tests/bugs/privilegedNPE/B.aj
new file mode 100644
index 000000000..ae872061d
--- /dev/null
+++ b/tests/bugs/privilegedNPE/B.aj
@@ -0,0 +1,11 @@
+
+
+privileged aspect B {
+ void blah(ITD x) { x.returnNothing("y"); }
+
+ public static void main(String[]argv) {
+ ITD a = new ITD();
+ a.returnNothing("a");
+ System.err.println("Call returned OK!");
+ }
+}
diff --git a/tests/bugs/privilegedNPE/ITD.aj b/tests/bugs/privilegedNPE/ITD.aj
new file mode 100644
index 000000000..bf2333d10
--- /dev/null
+++ b/tests/bugs/privilegedNPE/ITD.aj
@@ -0,0 +1,5 @@
+
+public class ITD {
+ private void returnNothing(Object a) {
+ }
+}
diff --git a/tests/bugs/privilegedNPE/a/ITD.aj b/tests/bugs/privilegedNPE/a/ITD.aj
new file mode 100644
index 000000000..78cd23d4e
--- /dev/null
+++ b/tests/bugs/privilegedNPE/a/ITD.aj
@@ -0,0 +1,6 @@
+package a;
+
+public class ITD {
+ private void returnNothing(Object a) {
+ }
+}
diff --git a/tests/bugs/privilegedNPE/b/B.aj b/tests/bugs/privilegedNPE/b/B.aj
new file mode 100644
index 000000000..9d8796a67
--- /dev/null
+++ b/tests/bugs/privilegedNPE/b/B.aj
@@ -0,0 +1,13 @@
+package b;
+
+import a.*;
+
+privileged aspect B {
+ void blah(ITD x) { x.returnNothing("y"); }
+
+ public static void main(String[]argv) {
+ ITD a = new ITD();
+ a.returnNothing("a");
+ System.err.println("Call returned OK!");
+ }
+}