diff options
author | Andy Clement <aclement@pivotal.io> | 2017-09-20 21:34:21 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2017-09-20 21:34:21 -0700 |
commit | 03752862ba3bc6ef132195673903dcf9109e8b93 (patch) | |
tree | 949971954474b167cbcef83fa3161de4c4a4a7c8 /tests/bugs1810/493554 | |
parent | ee99996fb7f727d34a5393374b5661dba1ec9f9f (diff) | |
parent | 784906d2ee0cb1b432a9aff6973c12cfd865db6e (diff) | |
download | aspectj-03752862ba3bc6ef132195673903dcf9109e8b93.tar.gz aspectj-03752862ba3bc6ef132195673903dcf9109e8b93.zip |
Merged post 1.8.5 changes into Java9 branch
Diffstat (limited to 'tests/bugs1810/493554')
-rw-r--r-- | tests/bugs1810/493554/Cmd.java | 10 | ||||
-rw-r--r-- | tests/bugs1810/493554/Cmd.kt | 9 | ||||
-rw-r--r-- | tests/bugs1810/493554/Code.java | 5 | ||||
-rw-r--r-- | tests/bugs1810/493554/Dep.java | 14 | ||||
-rw-r--r-- | tests/bugs1810/493554/FooAspect.aj | 17 | ||||
-rw-r--r-- | tests/bugs1810/493554/FooAspect.java | 25 |
6 files changed, 80 insertions, 0 deletions
diff --git a/tests/bugs1810/493554/Cmd.java b/tests/bugs1810/493554/Cmd.java new file mode 100644 index 000000000..8954d08af --- /dev/null +++ b/tests/bugs1810/493554/Cmd.java @@ -0,0 +1,10 @@ +package example.kusedep; + +import example.dep.Dep; + +public class Cmd { + public static void main(String[] args) { + Dep dep = new Dep(); + System.out.println(dep); + } +} diff --git a/tests/bugs1810/493554/Cmd.kt b/tests/bugs1810/493554/Cmd.kt new file mode 100644 index 000000000..a9a0238eb --- /dev/null +++ b/tests/bugs1810/493554/Cmd.kt @@ -0,0 +1,9 @@ +package example.kusedep; + +import example.dep.Dep; + +fun main(args: Array<String>) { + val dep = Dep() + println(dep) + System.exit(0) +} diff --git a/tests/bugs1810/493554/Code.java b/tests/bugs1810/493554/Code.java new file mode 100644 index 000000000..16a6a642b --- /dev/null +++ b/tests/bugs1810/493554/Code.java @@ -0,0 +1,5 @@ +public class Code { + public static void main(String []argv) { + new Runnable() { public void run() {}}; + } +} diff --git a/tests/bugs1810/493554/Dep.java b/tests/bugs1810/493554/Dep.java new file mode 100644 index 000000000..8ed5c1500 --- /dev/null +++ b/tests/bugs1810/493554/Dep.java @@ -0,0 +1,14 @@ +package example.dep;
+
+public class Dep {
+ private int a, b, c;
+
+ public Dep() {
+ a = 5;
+ }
+
+ public String toString() {
+
+ return "Dep";
+ }
+}
diff --git a/tests/bugs1810/493554/FooAspect.aj b/tests/bugs1810/493554/FooAspect.aj new file mode 100644 index 000000000..4ad4c22cc --- /dev/null +++ b/tests/bugs1810/493554/FooAspect.aj @@ -0,0 +1,17 @@ +package example.aspect; + +import example.dep.Dep; + +public aspect FooAspect pertarget(setFieldValue(Dep)) { + + // interface ajcMightHaveAspect { } + + pointcut setFieldValue(Dep dep) : + set(private * Dep.*) && target(dep); + + void around(Dep dep) : setFieldValue(dep) { +System.out.println("advised"); + proceed(dep); + } + +} diff --git a/tests/bugs1810/493554/FooAspect.java b/tests/bugs1810/493554/FooAspect.java new file mode 100644 index 000000000..87406db94 --- /dev/null +++ b/tests/bugs1810/493554/FooAspect.java @@ -0,0 +1,25 @@ + +package example.aspect; + +import org.aspectj.lang.*; +import org.aspectj.lang.annotation.*; + +import example.dep.Dep; + +@Aspect("pertarget(setFieldValue(example.dep.Dep))") +public class FooAspect { + + // interface ajcMightHaveAspect { } + + @Pointcut("set(private * example.dep.Dep.*) && target(dep)") + public void setFieldValue(Dep dep) {} + //pointcut setFieldValue(Dep dep) : set(private * Dep.*) && target(dep); + + @Around("setFieldValue(dep)") + public void foo(Dep dep, ProceedingJoinPoint pjp) { + //void around(Dep dep) : setFieldValue(dep) { +System.out.println("advised"); + pjp.proceed(new Object[]{dep}); + } + +} |