aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/CflowBindingOrig.java
blob: cd0f00b9d199ae08199d1c2eb0489aff95537672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
    }
}