diff options
author | aclement <aclement> | 2007-02-15 10:41:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-02-15 10:41:33 +0000 |
commit | b385e38ee74765c80845193e32bff2370dd78903 (patch) | |
tree | 10aa4bc6c2154d0724f355c0c23b5a35cea7480f /tests/bugs160 | |
parent | 2447dfe82db042aa10fa5c2a4ba0646c37dc26d7 (diff) | |
download | aspectj-b385e38ee74765c80845193e32bff2370dd78903.tar.gz aspectj-b385e38ee74765c80845193e32bff2370dd78903.zip |
test and fix for 171953
Diffstat (limited to 'tests/bugs160')
-rw-r--r-- | tests/bugs160/pr171953/test/AbstractExecutable.java | 5 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/AnotherExecutable.java | 5 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/Executable.java | 6 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/ExecutionAspect.aj | 12 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/RunnableAspect.aj | 11 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/SecondTestExecutable.java | 13 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/SubTestExecutable.java | 9 | ||||
-rw-r--r-- | tests/bugs160/pr171953/test/TestExecutable.java | 7 |
8 files changed, 68 insertions, 0 deletions
diff --git a/tests/bugs160/pr171953/test/AbstractExecutable.java b/tests/bugs160/pr171953/test/AbstractExecutable.java new file mode 100644 index 000000000..6d9f880a6 --- /dev/null +++ b/tests/bugs160/pr171953/test/AbstractExecutable.java @@ -0,0 +1,5 @@ +package test; + +public abstract class AbstractExecutable implements AnotherExecutable { + +} diff --git a/tests/bugs160/pr171953/test/AnotherExecutable.java b/tests/bugs160/pr171953/test/AnotherExecutable.java new file mode 100644 index 000000000..75103a696 --- /dev/null +++ b/tests/bugs160/pr171953/test/AnotherExecutable.java @@ -0,0 +1,5 @@ +package test; + +public interface AnotherExecutable extends Executable { + +} diff --git a/tests/bugs160/pr171953/test/Executable.java b/tests/bugs160/pr171953/test/Executable.java new file mode 100644 index 000000000..13cb945b1 --- /dev/null +++ b/tests/bugs160/pr171953/test/Executable.java @@ -0,0 +1,6 @@ +package test; + +public interface Executable { + + void execute(); +} diff --git a/tests/bugs160/pr171953/test/ExecutionAspect.aj b/tests/bugs160/pr171953/test/ExecutionAspect.aj new file mode 100644 index 000000000..1dd0266d8 --- /dev/null +++ b/tests/bugs160/pr171953/test/ExecutionAspect.aj @@ -0,0 +1,12 @@ +package test; + +public aspect ExecutionAspect { + +declare parents: AbstractExecutable implements java.io.Serializable; + + pointcut executions(Executable executable): execution(public void Executable.execute()) && this(executable); + + void around(Executable executable): executions(executable) { + System.err.println(thisJoinPoint); + } +} diff --git a/tests/bugs160/pr171953/test/RunnableAspect.aj b/tests/bugs160/pr171953/test/RunnableAspect.aj new file mode 100644 index 000000000..fa12b7b99 --- /dev/null +++ b/tests/bugs160/pr171953/test/RunnableAspect.aj @@ -0,0 +1,11 @@ +package test; + +public aspect RunnableAspect { + +// public void Executable.run() { +// execute(); +// } +// +// //declare parents: (Executable+ && !Executable) implements Runnable; +// declare parents: AbstractExecutable implements java.io.Serializable; +} diff --git a/tests/bugs160/pr171953/test/SecondTestExecutable.java b/tests/bugs160/pr171953/test/SecondTestExecutable.java new file mode 100644 index 000000000..1743a9728 --- /dev/null +++ b/tests/bugs160/pr171953/test/SecondTestExecutable.java @@ -0,0 +1,13 @@ +package test; + +public class SecondTestExecutable extends AbstractExecutable { + + public void execute() { + // should not happen because of ExecutionAspect prevents execution + throw new RuntimeException(); + } + + public static void main(String[] args) { + new SecondTestExecutable().execute(); + } +} diff --git a/tests/bugs160/pr171953/test/SubTestExecutable.java b/tests/bugs160/pr171953/test/SubTestExecutable.java new file mode 100644 index 000000000..8dd83bd03 --- /dev/null +++ b/tests/bugs160/pr171953/test/SubTestExecutable.java @@ -0,0 +1,9 @@ +package test; + +public class SubTestExecutable extends TestExecutable { + + @Override + public void execute() { + super.execute(); + } +} diff --git a/tests/bugs160/pr171953/test/TestExecutable.java b/tests/bugs160/pr171953/test/TestExecutable.java new file mode 100644 index 000000000..bfd296a2d --- /dev/null +++ b/tests/bugs160/pr171953/test/TestExecutable.java @@ -0,0 +1,7 @@ +package test; + +public class TestExecutable implements Executable { + + public void execute() { + } +} |