From 6870da4cbcfbf6b2ec267d50e2bcc04fd32bcaeb Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 17 Nov 2006 11:18:59 +0000 Subject: tests and fixes for pr164384 --- tests/bugs153/pr164384/Hello.java | 15 +++++++++++++++ tests/bugs153/pr164384/MainClass.java | 11 +++++++++++ tests/bugs153/pr164384/MyAnnotation.java | 9 +++++++++ tests/bugs153/pr164384/README.txt | 5 +++++ tests/bugs153/pr164384/WorldAspect.aj | 13 +++++++++++++ tests/bugs153/pr164384/library.jar | Bin 0 -> 1069 bytes tests/bugs153/pr164384_2/MainClass.java | 9 +++++++++ 7 files changed, 62 insertions(+) create mode 100644 tests/bugs153/pr164384/Hello.java create mode 100644 tests/bugs153/pr164384/MainClass.java create mode 100644 tests/bugs153/pr164384/MyAnnotation.java create mode 100644 tests/bugs153/pr164384/README.txt create mode 100644 tests/bugs153/pr164384/WorldAspect.aj create mode 100644 tests/bugs153/pr164384/library.jar create mode 100644 tests/bugs153/pr164384_2/MainClass.java (limited to 'tests/bugs153') diff --git a/tests/bugs153/pr164384/Hello.java b/tests/bugs153/pr164384/Hello.java new file mode 100644 index 000000000..c5d23b9df --- /dev/null +++ b/tests/bugs153/pr164384/Hello.java @@ -0,0 +1,15 @@ +package pkg; + +public class Hello { + + @MyAnnotation + public void sayHello() { + System.out.println("hello"); + int counter = 0; + for (int i = 0; i < 10; i++) { + counter = i; + } + + } + +} diff --git a/tests/bugs153/pr164384/MainClass.java b/tests/bugs153/pr164384/MainClass.java new file mode 100644 index 000000000..f809d4ef5 --- /dev/null +++ b/tests/bugs153/pr164384/MainClass.java @@ -0,0 +1,11 @@ +package pack; + +import pkg.Hello; + +public class MainClass { + + public static void main(String[] args) { + new Hello().sayHello(); + } + +} diff --git a/tests/bugs153/pr164384/MyAnnotation.java b/tests/bugs153/pr164384/MyAnnotation.java new file mode 100644 index 000000000..fc10a566c --- /dev/null +++ b/tests/bugs153/pr164384/MyAnnotation.java @@ -0,0 +1,9 @@ +package pkg; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +public @interface MyAnnotation { + +} diff --git a/tests/bugs153/pr164384/README.txt b/tests/bugs153/pr164384/README.txt new file mode 100644 index 000000000..f676dd47a --- /dev/null +++ b/tests/bugs153/pr164384/README.txt @@ -0,0 +1,5 @@ +to build library.jar: + +Compile the classes with a java6 jvm: javac Hello.java MyAnnotation.java + +Create the jar file: jar cf library.jar Hello.class MyAnnotation.class diff --git a/tests/bugs153/pr164384/WorldAspect.aj b/tests/bugs153/pr164384/WorldAspect.aj new file mode 100644 index 000000000..781e804e6 --- /dev/null +++ b/tests/bugs153/pr164384/WorldAspect.aj @@ -0,0 +1,13 @@ +package pack; + +import pkg.MyAnnotation; + +public aspect WorldAspect { + + pointcut exec() : execution(@MyAnnotation * *.*(..)); + + after() returning : exec() { + System.out.println("world"); + } + +} diff --git a/tests/bugs153/pr164384/library.jar b/tests/bugs153/pr164384/library.jar new file mode 100644 index 000000000..baa98fa95 Binary files /dev/null and b/tests/bugs153/pr164384/library.jar differ diff --git a/tests/bugs153/pr164384_2/MainClass.java b/tests/bugs153/pr164384_2/MainClass.java new file mode 100644 index 000000000..c3b4f2241 --- /dev/null +++ b/tests/bugs153/pr164384_2/MainClass.java @@ -0,0 +1,9 @@ +package pack; + +public class MainClass { + + public static void main(String[] args) { + + } + +} -- cgit v1.2.3