From 9be47cc3a9ead4208d6247fcc5da7216c231278a Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 20 Jan 2016 12:58:09 -0800 Subject: Fixes for compile time overweaving In writing a testcase for 352389 I discovered overweaving just wasn't working for a compile time series of test steps. This was due to a guard preventing secondary calls to addOrReplaceAspect. Without the secondary call the crosscutting collector for the aspect had recorded no mungers from the original aspect because it was still using an EclipseSourceType delegate. Later when it was using the binary BcelObjectType delegate and mungers were available, they weren't collected because of that missing addOrReplaceAspect call. --- tests/bugs189/352389/A.java | 3 +++ tests/bugs189/352389/B.java | 3 +++ tests/bugs189/352389/C.java | 3 +++ tests/bugs189/352389/Code.java | 7 +++++++ 4 files changed, 16 insertions(+) create mode 100644 tests/bugs189/352389/A.java create mode 100644 tests/bugs189/352389/B.java create mode 100644 tests/bugs189/352389/C.java create mode 100644 tests/bugs189/352389/Code.java (limited to 'tests/bugs189') diff --git a/tests/bugs189/352389/A.java b/tests/bugs189/352389/A.java new file mode 100644 index 000000000..d82598fa1 --- /dev/null +++ b/tests/bugs189/352389/A.java @@ -0,0 +1,3 @@ +public aspect A { +before(): execution(* m(..)) { System.out.println("a"); } +} diff --git a/tests/bugs189/352389/B.java b/tests/bugs189/352389/B.java new file mode 100644 index 000000000..950dfae0a --- /dev/null +++ b/tests/bugs189/352389/B.java @@ -0,0 +1,3 @@ +public aspect B { +before(): execution(* m(..)) { System.out.println("b"); } +} diff --git a/tests/bugs189/352389/C.java b/tests/bugs189/352389/C.java new file mode 100644 index 000000000..f86644d3b --- /dev/null +++ b/tests/bugs189/352389/C.java @@ -0,0 +1,3 @@ +public aspect C { +before(): execution(* m(..)) { System.out.println("c"); } +} diff --git a/tests/bugs189/352389/Code.java b/tests/bugs189/352389/Code.java new file mode 100644 index 000000000..c7c4e64ff --- /dev/null +++ b/tests/bugs189/352389/Code.java @@ -0,0 +1,7 @@ +public class Code { +public static void main(String []argv) { + new Code().m(); +} + +public void m() {} +} -- cgit v1.2.3