diff options
Diffstat (limited to 'tests/errors/NullWithFormals.java')
-rw-r--r-- | tests/errors/NullWithFormals.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/errors/NullWithFormals.java b/tests/errors/NullWithFormals.java new file mode 100644 index 000000000..1dc5cb229 --- /dev/null +++ b/tests/errors/NullWithFormals.java @@ -0,0 +1,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); + } + +} |