diff options
Diffstat (limited to 'tests/bugs/CflowBindingOrig.java')
-rw-r--r-- | tests/bugs/CflowBindingOrig.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs/CflowBindingOrig.java b/tests/bugs/CflowBindingOrig.java new file mode 100644 index 000000000..cd0f00b9d --- /dev/null +++ b/tests/bugs/CflowBindingOrig.java @@ -0,0 +1,36 @@ +// for Bugzilla Bug 34858 +// Weaver crash + +import org.aspectj.testing.Tester; + +/** + * Almost an exact duplicate of the reported issue + */ +public class CflowBindingOrig { + public static void main(String[] args) { + new Bar().foo(); + } + + static aspect MockProcessing { + pointcut testFlow(final Thread thread) : + cflow(execution(void run()) && this(thread) && within(Thread)); // the within is an optimization + + Object around() : + call(* DummyConfiguration.createRootApplicationModule(..)) && testFlow(Thread) + { + return null; + } + } +} + +class Bar { + void foo() { + DummyConfiguration.createRootApplicationModule(); + } +} + +class DummyConfiguration { + static Object createRootApplicationModule() { + return null; + } +} |