From e18c4f92938b117eaea32a340ea1ba65fa0585ae Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Tue, 1 Mar 2022 11:31:17 +0700 Subject: [PATCH] Name annotation vs native style aspects uniformly in github_128 tests Trying to find the difference between byte code generated by AJC for functionally identical annotation vs native style aspect, I move the aspects into subdirectories in order to be able to name them identically. This way, when decompiling them with javap or Fernflower it is easier to diff them later. Why the decompilation? Because for the thread pool testing scenario native syntax passes while annotation syntax fails. I.e., we need to find the difference. That can be done by reading source code, if you know where to look, or by starting with reverse engineering in order to first understand more and look at the code later. Signed-off-by: Alexander Kriegisch --- .../github_128/{ => annotation_syntax}/MarkerAAspect.aj | 0 .../github_128/{ => annotation_syntax}/MarkerBAspect.aj | 0 .../MarkerAAspect.aj} | 5 ++--- .../MarkerBAspect.aj} | 6 +----- .../resources/org/aspectj/systemtest/ajc198/ajc198.xml | 8 ++++---- 5 files changed, 7 insertions(+), 12 deletions(-) rename tests/bugs198/github_128/{ => annotation_syntax}/MarkerAAspect.aj (100%) rename tests/bugs198/github_128/{ => annotation_syntax}/MarkerBAspect.aj (100%) rename tests/bugs198/github_128/{MarkerANativeAspect.aj => native_syntax/MarkerAAspect.aj} (74%) rename tests/bugs198/github_128/{MarkerBNativeAspect.aj => native_syntax/MarkerBAspect.aj} (81%) diff --git a/tests/bugs198/github_128/MarkerAAspect.aj b/tests/bugs198/github_128/annotation_syntax/MarkerAAspect.aj similarity index 100% rename from tests/bugs198/github_128/MarkerAAspect.aj rename to tests/bugs198/github_128/annotation_syntax/MarkerAAspect.aj diff --git a/tests/bugs198/github_128/MarkerBAspect.aj b/tests/bugs198/github_128/annotation_syntax/MarkerBAspect.aj similarity index 100% rename from tests/bugs198/github_128/MarkerBAspect.aj rename to tests/bugs198/github_128/annotation_syntax/MarkerBAspect.aj diff --git a/tests/bugs198/github_128/MarkerANativeAspect.aj b/tests/bugs198/github_128/native_syntax/MarkerAAspect.aj similarity index 74% rename from tests/bugs198/github_128/MarkerANativeAspect.aj rename to tests/bugs198/github_128/native_syntax/MarkerAAspect.aj index 37d9f2fee..5e2ac5424 100644 --- a/tests/bugs198/github_128/MarkerANativeAspect.aj +++ b/tests/bugs198/github_128/native_syntax/MarkerAAspect.aj @@ -1,6 +1,5 @@ -public aspect MarkerANativeAspect { - declare precedence : MarkerANativeAspect, MarkerBNativeAspect; - public static int proceedTimes = 1; +public aspect MarkerAAspect { + declare precedence : MarkerAAspect, MarkerBAspect; Object around() : @annotation(MarkerA) && execution(* *(..)) { System.out.println(">> Outer intercept"); diff --git a/tests/bugs198/github_128/MarkerBNativeAspect.aj b/tests/bugs198/github_128/native_syntax/MarkerBAspect.aj similarity index 81% rename from tests/bugs198/github_128/MarkerBNativeAspect.aj rename to tests/bugs198/github_128/native_syntax/MarkerBAspect.aj index 6bd4b8683..52e95d1eb 100644 --- a/tests/bugs198/github_128/MarkerBNativeAspect.aj +++ b/tests/bugs198/github_128/native_syntax/MarkerBAspect.aj @@ -1,8 +1,4 @@ -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -public aspect MarkerBNativeAspect { +public aspect MarkerBAspect { Object around() : @annotation(MarkerB) && execution(* *(..)) { Runnable runnable = new Runnable() { @Override diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml index 0e1132782..25f5692f2 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml @@ -168,7 +168,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -326,7 +326,7 @@ - + @@ -405,7 +405,7 @@ - + -- 2.39.5