summaryrefslogtreecommitdiffstats
path: root/tests/errors/NullWithFormals.java
blob: 1dc5cb2298fdfb0cc958bd0583f8af4b2f62c9ea (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
37
38
39
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class NullWithFormals {

    public void realMain(String[] args) {
        new InnerWindowAdapter().windowClosing(null);
    }

    static class InnerWindowAdapter extends WindowAdapter {
        public void windowClosing(WindowEvent we) {
        }
    } 

    public static void main(String[] args) {
        new NullWithFormals().realMain(args);
    }
}


aspect AspectW {

    pointcut pc0(WindowEvent we, String str) : instanceof(WindowAdapter) && executions(void windowClosing(we));
    static before(WindowEvent we, String str): pc0(we, str) {
        System.out.println(thisJoinPoint);
    }   

    pointcut pc1(String str, WindowEvent we) : instanceof(WindowAdapter) && executions(void windowClosing(we));
    static before(String str, WindowEvent we): pc1(str, we) {
        System.out.println(thisJoinPoint);
    }

    pointcut pc2(WindowEvent we) : instanceof(WindowAdapter) && executions(void windowClosing(we));
    static before(WindowEvent we): pc2(we) {
        System.out.println(thisJoinPoint);
    }

}