diff options
author | aclement <aclement> | 2004-08-13 15:15:00 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-08-13 15:15:00 +0000 |
commit | fcdafdbddb66f4ce4046016132addd763353881c (patch) | |
tree | 20c65fbb9514cc5f3a0d002cfc9e9e23f7969f73 /tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java | |
parent | 2dfc73855a1d7ab7652476729e6575f9116e12b8 (diff) | |
download | aspectj-fcdafdbddb66f4ce4046016132addd763353881c.tar.gz aspectj-fcdafdbddb66f4ce4046016132addd763353881c.zip |
Fix and tests for Bugzilla Bug 71372
NoSuchMethodError calling private method from around advice in inner aspect
Diffstat (limited to 'tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java')
-rw-r--r-- | tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java b/tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java new file mode 100644 index 000000000..f1a847d68 --- /dev/null +++ b/tests/bugs/doYouHaveVisiblePrivates/PrivateCall.java @@ -0,0 +1,30 @@ + +// In this program, the around advice calls foo() and foo is a private static field in +// class PrivateCall. When compiled the around() advice will be inlined and should call +// foo() through an inline accessor method. +public class PrivateCall { + + public void test () {foo("test");} + + private static void foo (String from) { + System.err.print(":"+from); + } + + public static void main(String[] args) { + new PrivateCall().test(); + } + + private static aspect Aspect { + + pointcut execTest () : + execution(* PrivateCall.test()); + + before () : execTest () { + foo("before"); + } + + void around () : execTest () { + foo("around"); + } + } +}
\ No newline at end of file |