summaryrefslogtreecommitdiffstats
path: root/tests/errors/NoNew_PR398.java
blob: d3603fc55c66b13cb3d3713378ddf1a2255524e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import org.aspectj.testing.Tester;
/**
 * PR#398
 */
class NoNew {
    
    public static void main(String[] args) {
        try {
            new NoNew().thrower();
        } catch (Exception e) {
        }
    }
    void thrower() throws Exception {
        throw /*new*/ Exception("exception"); // missing new
    }
}

aspect AspectTest of eachJVM() {
    
    pointcut pc3(): executions(void thrower());
    before(): pc3() {
    }
}