From 6e155a6b9b78ec64f2fd4dc08152698277f1e7b7 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 14 Oct 2004 08:12:09 +0000 Subject: Fix for Bugzilla Bug 74238: Applet which uses cflow pointcut gets AccessControlException --- ajde/testdata/SecurityManagerTest/build.xml | 38 ++++++++++++++++++++++ ajde/testdata/SecurityManagerTest/src/Aspect.aj | 24 ++++++++++++++ .../SecurityManagerTest/src/HelloWorld.java | 24 ++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 ajde/testdata/SecurityManagerTest/build.xml create mode 100644 ajde/testdata/SecurityManagerTest/src/Aspect.aj create mode 100644 ajde/testdata/SecurityManagerTest/src/HelloWorld.java (limited to 'ajde') diff --git a/ajde/testdata/SecurityManagerTest/build.xml b/ajde/testdata/SecurityManagerTest/build.xml new file mode 100644 index 000000000..2b2496fc1 --- /dev/null +++ b/ajde/testdata/SecurityManagerTest/build.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ajde/testdata/SecurityManagerTest/src/Aspect.aj b/ajde/testdata/SecurityManagerTest/src/Aspect.aj new file mode 100644 index 000000000..74a3f6bc9 --- /dev/null +++ b/ajde/testdata/SecurityManagerTest/src/Aspect.aj @@ -0,0 +1,24 @@ +/* + * Created on 28-Sep-2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ + + + +/** + * @author websterm + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public aspect Aspect { + + pointcut method () : + execution(* println(..)) && within(HelloWorld) && cflow(execution(* main(..))); + + before () : method () { + System.out.println(thisJoinPoint.getSignature()); + } +} diff --git a/ajde/testdata/SecurityManagerTest/src/HelloWorld.java b/ajde/testdata/SecurityManagerTest/src/HelloWorld.java new file mode 100644 index 000000000..fe981e7e6 --- /dev/null +++ b/ajde/testdata/SecurityManagerTest/src/HelloWorld.java @@ -0,0 +1,24 @@ +/* + * Created on 28-Sep-2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ + +/** + * @author websterm + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class HelloWorld { + + public static void println () { + System.out.println("Hello World!"); + } + + public static void main(String[] args) { + println(); +// System.getProperty("foo"); + } +} -- cgit v1.2.3