aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs171
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-08-22 12:43:56 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-08-22 12:43:56 -0700
commit7c6e9361dae7f2ee4cf15b68eccdf54e889d1f75 (patch)
tree67d2a276b314067ee6d12c2f0b09a46cdf6e2c60 /tests/bugs171
parent911f5e939194bc3a4638ac7e504bb7e95033a191 (diff)
downloadaspectj-7c6e9361dae7f2ee4cf15b68eccdf54e889d1f75.tar.gz
aspectj-7c6e9361dae7f2ee4cf15b68eccdf54e889d1f75.zip
386049: test and fix. 387568: wip test code
Diffstat (limited to 'tests/bugs171')
-rwxr-xr-xtests/bugs171/pr386049/de/scrum_master/galileo/LoggingAspect.aj11
-rwxr-xr-xtests/bugs171/pr386049/de/scrum_master/galileo/filter/BasicFilter.java10
-rwxr-xr-xtests/bugs171/pr386049/de/scrum_master/galileo/filter/JsoupFilter.java17
-rw-r--r--tests/bugs171/pr387568/Code.java17
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs171/pr386049/de/scrum_master/galileo/LoggingAspect.aj b/tests/bugs171/pr386049/de/scrum_master/galileo/LoggingAspect.aj
new file mode 100755
index 000000000..ee45206fb
--- /dev/null
+++ b/tests/bugs171/pr386049/de/scrum_master/galileo/LoggingAspect.aj
@@ -0,0 +1,11 @@
+package de.scrum_master.galileo;
+
+import de.scrum_master.galileo.filter.BasicFilter;
+
+privileged aspect LoggingAspect
+{
+ void around(BasicFilter filter) : execution(* BasicFilter.run()) && this(filter) {
+ filter.getLogMessage(); proceed(filter);
+ }
+
+}
diff --git a/tests/bugs171/pr386049/de/scrum_master/galileo/filter/BasicFilter.java b/tests/bugs171/pr386049/de/scrum_master/galileo/filter/BasicFilter.java
new file mode 100755
index 000000000..0d6aac662
--- /dev/null
+++ b/tests/bugs171/pr386049/de/scrum_master/galileo/filter/BasicFilter.java
@@ -0,0 +1,10 @@
+package de.scrum_master.galileo.filter;
+
+
+public abstract class BasicFilter
+{
+ protected abstract String getLogMessage();
+ public void run() {
+ System.out.println("run()");
+ }
+}
diff --git a/tests/bugs171/pr386049/de/scrum_master/galileo/filter/JsoupFilter.java b/tests/bugs171/pr386049/de/scrum_master/galileo/filter/JsoupFilter.java
new file mode 100755
index 000000000..da14ff778
--- /dev/null
+++ b/tests/bugs171/pr386049/de/scrum_master/galileo/filter/JsoupFilter.java
@@ -0,0 +1,17 @@
+package de.scrum_master.galileo.filter;
+
+
+public class JsoupFilter extends BasicFilter {
+ @Override
+ protected String getLogMessage() {
+ System.out.println("JsoupFilter.getLogMessage()");
+ return "Cleaning up HTML, removing clutter, fixing structure";
+ }
+
+ public static void main(String []argv) {
+ new JsoupFilter().run();
+ }
+
+
+
+}
diff --git a/tests/bugs171/pr387568/Code.java b/tests/bugs171/pr387568/Code.java
new file mode 100644
index 000000000..99d248803
--- /dev/null
+++ b/tests/bugs171/pr387568/Code.java
@@ -0,0 +1,17 @@
+import java.lang.annotation.*;
+
+
+class AAA {
+ public void m() {
+ Color[] cs = Color.values();
+ }
+}
+
+aspect Foo {
+ after(): @annotation(Anno) {}
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+enum Color {R,G,B;}