aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2004-01-14 11:28:13 +0000
committerjhugunin <jhugunin>2004-01-14 11:28:13 +0000
commit7bbd1f419239dc9e8b46e7fd912b2bc007bbd76a (patch)
treedbe5e47911df5c873860174baf2dc403536e6915 /tests/bugs
parent5c4db9cb620918dcf064ddbfc50f54130d3b2cab (diff)
downloadaspectj-7bbd1f419239dc9e8b46e7fd912b2bc007bbd76a.tar.gz
aspectj-7bbd1f419239dc9e8b46e7fd912b2bc007bbd76a.zip
Fix for Bugzilla Bug 46280
compiler issues error on inner aspects when privilieged
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/PrivilegedParsing.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs/PrivilegedParsing.java b/tests/bugs/PrivilegedParsing.java
new file mode 100644
index 000000000..4fd0e66eb
--- /dev/null
+++ b/tests/bugs/PrivilegedParsing.java
@@ -0,0 +1,41 @@
+public class PrivilegedParsing {
+ private int hidden;
+ public int visible;
+ public PrivilegedParsing(int priv, int pub) {
+ hidden = priv;
+ visible = pub;
+ }
+ public void doSomething() {
+ System.out.println("" + hidden + ", " + visible + "");
+ }
+ public static void main(String[] args) {
+ PrivilegedParsing capsule = new PrivilegedParsing(1, 1);
+ capsule.doSomething();
+ }
+}
+
+aspect Outer {
+ static privileged //<== JUST TRY TO UNCOMMENT THIS!
+ aspect Inner {
+ pointcut call2doSomething(PrivilegedParsing capsule):
+ call(void PrivilegedParsing.doSomething())
+ && target(capsule);
+ before(PrivilegedParsing capsule): call2doSomething(capsule) {
+ capsule.visible++;
+ capsule.hidden++;
+ }
+ }
+}
+
+interface Marker {
+ static privileged //<== JUST TRY TO UNCOMMENT THIS!
+ aspect Inner {
+ pointcut call2doSomething(PrivilegedParsing capsule):
+ call(void PrivilegedParsing.doSomething())
+ && target(capsule);
+ before(PrivilegedParsing capsule): call2doSomething(capsule) {
+ capsule.visible++;
+ capsule.hidden++;
+ }
+ }
+} \ No newline at end of file