aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs185
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2015-01-07 16:22:57 -0800
committerAndy Clement <aclement@gopivotal.com>2015-01-07 16:22:57 -0800
commit7569aad932296bce469e719e67a67a8d1bc8bc8b (patch)
tree5231cf2611cbf74dcacd502e8678be881772efa6 /tests/bugs185
parent32aa13acb574980321acc80bacc936c9b2bf505c (diff)
downloadaspectj-7569aad932296bce469e719e67a67a8d1bc8bc8b.tar.gz
aspectj-7569aad932296bce469e719e67a67a8d1bc8bc8b.zip
456457: unresolvable member fix. Testcode for 456801,455608
Diffstat (limited to 'tests/bugs185')
-rw-r--r--tests/bugs185/455608/Code2.java16
-rw-r--r--tests/bugs185/455608/Code3.java17
-rw-r--r--tests/bugs185/456357/DummyClass.java13
-rw-r--r--tests/bugs185/456357/LogMe.java5
-rw-r--r--tests/bugs185/456357/SampleAspect.java10
-rw-r--r--tests/bugs185/456357/SampleUtil.java5
6 files changed, 66 insertions, 0 deletions
diff --git a/tests/bugs185/455608/Code2.java b/tests/bugs185/455608/Code2.java
new file mode 100644
index 000000000..6622b7b3e
--- /dev/null
+++ b/tests/bugs185/455608/Code2.java
@@ -0,0 +1,16 @@
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Bar(String)
+@Foo("abc")
+public class Code2 {
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo { String value();}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Bar {
+ Class<?>[] value();
+}
diff --git a/tests/bugs185/455608/Code3.java b/tests/bugs185/455608/Code3.java
new file mode 100644
index 000000000..a6271fb14
--- /dev/null
+++ b/tests/bugs185/455608/Code3.java
@@ -0,0 +1,17 @@
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Bar(value=String,i=4)
+//@Foo("abc")
+public class Code3 {
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo { String value();}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Bar {
+ Class<?>[] value();
+int i();
+}
diff --git a/tests/bugs185/456357/DummyClass.java b/tests/bugs185/456357/DummyClass.java
new file mode 100644
index 000000000..f3d8572ec
--- /dev/null
+++ b/tests/bugs185/456357/DummyClass.java
@@ -0,0 +1,13 @@
+public class DummyClass {
+ @LogMe
+ public void doSomething() {
+ SampleUtil sampleUtil = new SampleUtil();
+ // pass null for simplicity !
+ sampleUtil.sampleMethod(null);
+ System.out.println("Do Something");
+ }
+
+ public static void main(String[] args) {
+ new DummyClass().doSomething();
+ }
+}
diff --git a/tests/bugs185/456357/LogMe.java b/tests/bugs185/456357/LogMe.java
new file mode 100644
index 000000000..a16ca765a
--- /dev/null
+++ b/tests/bugs185/456357/LogMe.java
@@ -0,0 +1,5 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface LogMe {}
diff --git a/tests/bugs185/456357/SampleAspect.java b/tests/bugs185/456357/SampleAspect.java
new file mode 100644
index 000000000..15b52fa71
--- /dev/null
+++ b/tests/bugs185/456357/SampleAspect.java
@@ -0,0 +1,10 @@
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.*;
+
+aspect SampleAspect {
+//@Aspect public class SampleAspect {
+ //@Before("@annotation(logMe)") public void beforeAdvice(JoinPoint thisJoinPoint, LogMe logMe) {
+before(LogMe logMe): @annotation(logMe) {
+ System.out.println(thisJoinPoint);
+ }
+}
diff --git a/tests/bugs185/456357/SampleUtil.java b/tests/bugs185/456357/SampleUtil.java
new file mode 100644
index 000000000..1ed161c42
--- /dev/null
+++ b/tests/bugs185/456357/SampleUtil.java
@@ -0,0 +1,5 @@
+import java.util.Map;
+
+public class SampleUtil {
+ public void sampleMethod(Map<String, Object>[] mapArray) {}
+}