From 1b01255892ef222c14fea25b5db77208f1f6bb13 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 25 Jan 2005 20:18:42 +0000 Subject: Fix for Bug 83563: pertypewithin() handling of inner classes --- tests/bugs150/PR83563_1.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/bugs150/PR83563_1.java (limited to 'tests/bugs150/PR83563_1.java') diff --git a/tests/bugs150/PR83563_1.java b/tests/bugs150/PR83563_1.java new file mode 100644 index 000000000..834e450fe --- /dev/null +++ b/tests/bugs150/PR83563_1.java @@ -0,0 +1,23 @@ +public class PR83563_1 { + public static void main(String[] args) { + new NestedTest().run(); + int c = PertypewithinTest.aspectOf(PR83563_1.class).cnt; + if (c!=2) + throw new RuntimeException("Expected 2 advice executions: "+c); + } + + static class NestedTest implements Runnable { + public void run() { + System.out.println("Running..."); + } + } +} + +aspect PertypewithinTest pertypewithin(PR83563_1) { + public static int cnt = 0; + + before() : execution(* *.*(..)) { + cnt++; + System.out.println(thisJoinPointStaticPart); + } +} -- cgit v1.2.3