Browse Source

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 <Alexander@Kriegisch.name>
tags/V1_9_9
Alexander Kriegisch 2 years ago
parent
commit
e18c4f9293

tests/bugs198/github_128/MarkerAAspect.aj → tests/bugs198/github_128/annotation_syntax/MarkerAAspect.aj View File


tests/bugs198/github_128/MarkerBAspect.aj → tests/bugs198/github_128/annotation_syntax/MarkerBAspect.aj View File


tests/bugs198/github_128/MarkerANativeAspect.aj → tests/bugs198/github_128/native_syntax/MarkerAAspect.aj View File

@@ -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");

tests/bugs198/github_128/MarkerBNativeAspect.aj → tests/bugs198/github_128/native_syntax/MarkerBAspect.aj View File

@@ -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

+ 4
- 4
tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml View File

@@ -168,7 +168,7 @@
</ajc-test>

<ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ)">
<compile files="Application.java MarkerA.java MarkerAAspect.aj MarkerB.java MarkerBAspect.aj" options="-1.8" />
<compile files="Application.java MarkerA.java MarkerB.java annotation_syntax/MarkerAAspect.aj annotation_syntax/MarkerBAspect.aj" options="-1.8" />
<run class="Application" options="1,1">
<stdout ordered="no">
<line text=">> Outer intercept"/>
@@ -247,7 +247,7 @@
</ajc-test>

<ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ, thread pool)">
<compile files="Application.java MarkerA.java MarkerAAspect.aj MarkerB.java MarkerBAspect.aj" options="-1.8" />
<compile files="Application.java MarkerA.java MarkerB.java annotation_syntax/MarkerAAspect.aj annotation_syntax/MarkerBAspect.aj" options="-1.8" />
<run class="Application" options="1,1,true">
<stdout ordered="no">
<line text=">> Outer intercept"/>
@@ -326,7 +326,7 @@
</ajc-test>

<ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native)">
<compile files="Application.java MarkerA.java MarkerANativeAspect.aj MarkerB.java MarkerBNativeAspect.aj" options="-1.8" />
<compile files="Application.java MarkerA.java MarkerB.java native_syntax/MarkerAAspect.aj native_syntax/MarkerBAspect.aj" options="-1.8" />
<run class="Application" options="1,1">
<stdout ordered="no">
<line text=">> Outer intercept"/>
@@ -405,7 +405,7 @@
</ajc-test>

<ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native, thread pool)">
<compile files="Application.java MarkerA.java MarkerANativeAspect.aj MarkerB.java MarkerBNativeAspect.aj" options="-1.8" />
<compile files="Application.java MarkerA.java MarkerB.java native_syntax/MarkerAAspect.aj native_syntax/MarkerBAspect.aj" options="-1.8" />
<run class="Application" options="1,1,true">
<stdout ordered="no">
<line text=">> Outer intercept"/>

Loading…
Cancel
Save