]> source.dussan.org Git - aspectj.git/commitdiff
Merge branch 'master' into java-18
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 23 Mar 2022 08:44:00 +0000 (15:44 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 23 Mar 2022 08:44:00 +0000 (15:44 +0700)
# Conflicts:
# tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java
# tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml

1  2 
testing/src/test/java/org/aspectj/testing/RunSpec.java
tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java
tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml

index cb3b781bb03cfd73510a5b417afc41b8e51d9211,3aefb0760903a9aec1817a969b81c42999ca7aa5..8453bc163e9b0f32b3bb6313d3bc328ac9bce2e1
@@@ -21,6 -21,50 +21,23 @@@ public class Bugs198Tests extends XMLBa
      runTest("ITD annotation with mandatory parameter via aspectpath");
    }
  
 -  public void testAnnotationStyleSpecialIfClauses() {
 -    runTest("annotation style A");
 -  }
 -
 -  public void testAnnotationStylePointcutInheritanceWithIfClauses() {
 -    runTest("annotation style B");
 -  }
 -
 -  public void testAnnotationStyleSpecialIfClauses2_gh120() {
 -    runTest("annotation style C");
 -  }
 -
 -  public void testAnnotationStyleSpecialIfClauses3_gh120() {
 -    runTest("annotation style D");
 -  }
 -
 -  public void testAnnotationStyleNegatedIf_gh122() {
 -    runTest("annotation style negated if");
 -  }
 -
 -  public void testGitHub_125() {
 -    try (PropertyEnvironment env = ScopedSystemProperties.newPropertyEnvironment()) {
 -      env.setProperty("org.aspectj.weaver.openarchives", "20");
 -      runTest("compiler can re-open closed JARs");
 -    }
 -  }
 -
+   public void testAsyncProceedNestedAroundAdvice_gh128() {
+     runTest("asynchronous proceed for nested around-advice (@AspectJ)");
+   }
+   public void testAsyncProceedNestedAroundAdviceThreadPool_gh128() {
+     // TODO: future improvement, see https://github.com/eclipse/org.aspectj/issues/141
+     // runTest("asynchronous proceed for nested around-advice (@AspectJ, thread pool)");
+   }
+   public void testAsyncProceedNestedAroundAdviceNative_gh128() {
+     runTest("asynchronous proceed for nested around-advice (native)");
+   }
+   public void testAsyncProceedNestedAroundAdviceNativeThreadPool_gh128() {
+     runTest("asynchronous proceed for nested around-advice (native, thread pool)");
+   }
    public static Test suite() {
      return XMLBasedAjcTestCase.loadSuite(Bugs198Tests.class);
    }
index 85bd872b362cb752bda863e4c954078a6486498f,25f5692f20389fd87ca964eeb63c4a99707fe908..6f2a34274202022237f66dd2476358e953fd9ee4
                <compile files="Buffers.java" options="--release 8"/>
        </ajc-test>
  
 -      <ajc-test dir="bugs198/github_115" title="annotation style A">
 -              <compile files="A.java" options="-1.5">
 -                      <message kind="warning" line="28" text="advice defined in Azpect has not been applied [Xlint:adviceDidNotMatch]"/>
 -              </compile>
 -              <run class="A">
 -                      <stdout>
 -                              <line text="Azpect.before"/>
 -                              <line text="A.main"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
 -      <ajc-test dir="bugs198/github_115" title="annotation style B">
 -              <compile files="B.java" options="-1.5"/>
 -              <run class="B">
 -                      <stdout>
 -                              <line text="Azpect.before"/>
 -                              <line text="B.main"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
 -      <ajc-test dir="bugs198/github_120" title="annotation style C">
 -              <compile files="C.java" options="-1.5"/>
 -              <run class="C">
 -                      <stdout>
 -                              <line text="check if() pointcut running on C(1)"/>
 -                              <line text="Azpect1.beforeAdvice executing"/>
 -                              <line text="C.run() executing"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
 -      <ajc-test dir="bugs198/github_120" title="annotation style D">
 -              <compile files="D.java" options="-1.5"/>
 -              <run class="D">
 -                      <stdout>
 -                              <line text="advice running"/>
 -                              <line text="D.run() executing"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
 -      <ajc-test dir="bugs198/github_122" title="annotation style negated if">
 -              <compile files="E.java" options="-1.5"/>
 -              <run class="E">
 -                      <stdout>
 -                              <line text="advice running"/>
 -                              <line text="E.run() executing"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
 -      <ajc-test dir="bugs198/github_125" title="compiler can re-open closed JARs">
 -              <!--
 -                      Here the Java test sets system property org.aspectj.weaver.openarchives to 20 in order to provoke
 -                      open JAR limit exhaustion
 -              -->
 -              <compile files="Application.java" options="-1.5" />
 -              <run class="Application">
 -                      <stdout>
 -                              <line text="Before advice"/>
 -                              <line text="Hello world!"/>
 -                      </stdout>
 -              </run>
 -      </ajc-test>
 -
+       <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ)">
+               <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"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,1">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="1,2">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,2">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+       </ajc-test>
+       <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ, thread pool)">
+               <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"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,1,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="1,2,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,2,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+       </ajc-test>
+       <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native)">
+               <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"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,1">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="1,2">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,2">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+       </ajc-test>
+       <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native, thread pool)">
+               <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"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,1,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="1,2,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                       </stdout>
+               </run>
+               <run class="Application" options="2,2,true">
+                       <stdout ordered="no">
+                               <line text=">> Outer intercept"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="  >> Outer proceed"/>
+                               <line text="    >> Inner intercept"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="    &lt;&lt; Inner intercept"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="  &lt;&lt; Outer proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="      >> Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="        Doing something"/>
+                               <line text="      &lt;&lt; Inner proceed"/>
+                               <line text="&lt;&lt; Outer intercept"/>
+                       </stdout>
+               </run>
+       </ajc-test>
  </suite>