]> source.dussan.org Git - aspectj.git/commitdiff
Make all existing tests run on JDK 21
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Thu, 5 Oct 2023 04:29:04 +0000 (11:29 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Thu, 5 Oct 2023 04:29:04 +0000 (11:29 +0700)
This mostly affects pattern matching for switch and record patterns.

Two tests which were working before for pattern matching for switch
(preview 4), started to fail, so the corresponding code was commented
out and https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466
recorded.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tests/features1921/java21/SwitchPatternPreview3Aspect.aj [new file with mode: 0644]
tests/features1921/java21/SwitchPatternPreview4OK.java [new file with mode: 0644]
tests/src/test/java/org/aspectj/systemtest/ajc1921/Ajc1921TestsJava.java
tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java
tests/src/test/java/org/aspectj/systemtest/ajc1921/Java21PreviewFeaturesTests.java
tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml

diff --git a/tests/features1921/java21/SwitchPatternPreview3Aspect.aj b/tests/features1921/java21/SwitchPatternPreview3Aspect.aj
new file mode 100644 (file)
index 0000000..cab9a2b
--- /dev/null
@@ -0,0 +1,97 @@
+import java.util.List;
+import java.util.Locale;
+
+aspect SwitchPatternPreview3Aspect {
+  Object around(Object o) : execution(* doSomethingWithObject(*)) && args(o) {
+    System.out.println(switch (o) {
+      case null      -> "null";
+      case Integer i -> String.format("int %d", i);
+      case Long l    -> String.format("long %d", l);
+      case Double d  -> String.format(Locale.ENGLISH, "double %f", d);
+      case String s  -> String.format("String %s", s);
+      default        -> o.toString();
+    });
+    return proceed(o);
+  }
+
+  before(Shape s) : execution(* doSomethingWithShape(*)) && args(s) {
+    System.out.println(switch (s) {
+      case Circle c when (c.calculateArea() > 100) -> "Large circle";
+      case Circle c -> "Small circle";
+      default -> "Non-circle";
+    });
+  }
+
+  after(S s) : execution(* doSomethingWithSealedClass(*)) && args(s) {
+    System.out.println(switch (s) {
+      case A a -> "Sealed sub-class A";
+      case B b -> "Sealed sub-class B";
+      case C c -> "Sealed sub-record C";
+    });
+  }
+
+  Object around(Integer i): execution(* doSomethingWithInteger(*)) && args(i) {
+    // This used to work in preview 4 (Java 20), but fails during runtime with
+    //   java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4
+    // in ECJ 3.36.0-SNAPSHOT with Java 21.
+    // See:
+    //   https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466.
+    //
+    // TODO: Activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 is fixed.
+    /*
+    System.out.println(
+      switch (i) {
+        case null -> "value unavailable: " + i;
+        case -1, 1 -> "absolute value 1: " + i;
+        case Integer value when value > 0 -> "positive integer: " + i;
+        default -> "other integer: " + i;
+      }
+    );
+    */
+    return proceed(i);
+  }
+}
+
+class Shape {}
+class Rectangle extends Shape {}
+class Circle extends Shape {
+  private final double radius;
+  public Circle(double radius) { this.radius = radius; }
+  double calculateArea() { return Math.PI * radius * radius; }
+}
+
+sealed interface S permits A, B, C {}
+final class A implements S {}
+final class B implements S {}
+record C(int i) implements S {}  // Implicitly final
+
+class Application {
+  public static void main(String[] args) {
+    doSomethingWithObject(null);
+    doSomethingWithObject(123);
+    doSomethingWithObject(999L);
+    doSomethingWithObject(12.34);
+    doSomethingWithObject("foo");
+    doSomethingWithObject(List.of(123, "foo", 999L, 12.34));
+
+    doSomethingWithShape(new Rectangle());
+    doSomethingWithShape(new Circle(5));
+    doSomethingWithShape(new Circle(6));
+
+    doSomethingWithSealedClass(new A());
+    doSomethingWithSealedClass(new B());
+    doSomethingWithSealedClass(new C(5));
+
+    doSomethingWithInteger(-1);
+    doSomethingWithInteger(0);
+    doSomethingWithInteger(42);
+    doSomethingWithInteger(-99);
+    doSomethingWithInteger(Integer.valueOf(123));
+    doSomethingWithInteger(null);
+  }
+
+  public static Object doSomethingWithObject(Object o) { return o; }
+  public static void doSomethingWithSealedClass(S s) {}
+  public static void doSomethingWithShape(Shape s) {}
+  public static Object doSomethingWithInteger(Integer o) { return o; }
+}
diff --git a/tests/features1921/java21/SwitchPatternPreview4OK.java b/tests/features1921/java21/SwitchPatternPreview4OK.java
new file mode 100644 (file)
index 0000000..c9caf7e
--- /dev/null
@@ -0,0 +1,157 @@
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Inspired by examples in https://openjdk.org/jeps/427
+ */
+public class SwitchPatternPreview4OK {
+  public static void main(String[] args) {
+
+    System.out.println(formatterPatternSwitch(null));
+    System.out.println(formatterPatternSwitch(123));
+    System.out.println(formatterPatternSwitch(999L));
+    System.out.println(formatterPatternSwitch(12.34));
+    System.out.println(formatterPatternSwitch("foo"));
+    System.out.println(formatterPatternSwitch(List.of(123, "foo", 999L, 12.34)));
+
+    System.out.println(testCircle(new Rectangle()));
+    System.out.println(testCircle(new Circle(5)));
+    System.out.println(testCircle(new Circle(6)));
+
+    System.out.println(testSealedCoverage(new A()));
+    System.out.println(testSealedCoverage(new B()));
+    System.out.println(testSealedCoverage(new C(5)));
+
+//    constantLabelMustAppearBeforePattern(-1);
+//    constantLabelMustAppearBeforePattern(0);
+//    constantLabelMustAppearBeforePattern(42);
+//    constantLabelMustAppearBeforePattern(-99);
+//    constantLabelMustAppearBeforePattern(Integer.valueOf(123));
+//    constantLabelMustAppearBeforePattern(null);
+
+    // TODO: Activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 is fixed.
+    /*
+    constantLabelMustAppearBeforePatternInteger(-1);
+    constantLabelMustAppearBeforePatternInteger(0);
+    constantLabelMustAppearBeforePatternInteger(42);
+    constantLabelMustAppearBeforePatternInteger(-99);
+    constantLabelMustAppearBeforePatternInteger(Integer.valueOf(123));
+    constantLabelMustAppearBeforePatternInteger(null);
+    */
+
+    System.out.println(testGenericSealedExhaustive(new E<Integer>()));
+  }
+
+  static String formatterPatternSwitch(Object o) {
+    return switch (o) {
+      case null      -> "null";
+      case Integer i -> String.format("int %d", i);
+      case Long l    -> String.format("long %d", l);
+      case Double d  -> String.format(Locale.ENGLISH, "double %f", d);
+      case String s  -> String.format("String %s", s);
+      default        -> o.toString();
+    };
+  }
+
+  static class Shape {}
+  static class Rectangle extends Shape {}
+  static class Circle extends Shape {
+    private final double radius;
+    public Circle(double radius) { this.radius = radius; }
+    double calculateArea() { return Math.PI * radius * radius; }
+  }
+
+  static String testCircle(Shape s) {
+    return switch (s) {
+      case Circle c when (c.calculateArea() > 100) -> "Large circle";
+      case Circle c -> "Small circle";
+      default -> "Non-circle";
+    };
+  }
+
+  sealed interface S permits A, B, C {}
+  final static class A implements S {}
+  final static class B implements S {}
+  static record C(int i) implements S {}  // Implicitly final
+
+  static String testSealedCoverage(S s) {
+    return switch (s) {
+      case A a -> "Sealed sub-class A";
+      case B b -> "Sealed sub-class B";
+      case C c -> "Sealed sub-record C";
+    };
+  }
+
+  /**
+   * According to an example from JEP 420, this should work, but it does not, neither with Javac nor ECJ.
+   *
+   * See:
+   *   https://openjdk.java.net/jeps/420#1b--Dominance-of-pattern-labels
+   *   https://bugs.openjdk.java.net/browse/JDK-8273326
+   *   https://bugs.eclipse.org/bugs/show_bug.cgi?id=579355
+   *
+   * TODO: reactivate when implemented or move to preview 5 with Java 21, Eclipse 4.28.
+   */
+/*
+  static String constantLabelMustAppearBeforePattern(Object o) {
+    switch (o) {
+      case null -> System.out.println("value unavailable: " + o);
+      case -1, 1 -> System.out.println("special case:" + o);
+      case Integer value when value > 0 -> System.out.println("positive integer: " + o);
+      case Integer i -> System.out.println("other integer: " + o);
+      default -> System.out.println("non-integer: " + o);
+    }
+    return o == null ? "null" : o.toString();
+  }
+*/
+
+  /**
+   * This used to work in preview 4 (Java 20), but fails during runtime with
+   *   java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4
+   * in ECJ 3.36.0-SNAPSHOT with Java 21.
+   * See:
+   *   https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466.
+   *
+   * TODO: Activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 is fixed.
+   */
+  static String constantLabelMustAppearBeforePatternInteger(Integer i) {
+    switch (i) {
+      case null -> System.out.println("value unavailable: " + i);
+      case -1, 1 -> System.out.println("absolute value 1: " + i);
+      case Integer value when value > 0 -> System.out.println("positive integer: " + i);
+      default -> System.out.println("other integer: " + i);
+    }
+    return i == null ? "null" : i.toString();
+  }
+
+  static void nullCanAppearAfterConstantLabel(Integer i) {
+    switch (i) {
+      case -1, 1 -> System.out.println("absolute value 1: " + i);
+      case null -> System.out.println("value unavailable: " + i);
+      case Integer value when value > 0 -> System.out.println("positive integer: " + i);
+      default -> System.out.println("other integer: " + i);
+    }
+  }
+
+  /**
+   * According to an example from JEP 420, this should work with preview 2 (Java 18), and it does with Javac,
+   * but not with ECJ for Java 18, 19 and 20.
+   *
+   * See:
+   *   https://openjdk.java.net/jeps/420#2--Exhaustiveness-of-switch-expressions-and-statements
+   *   https://bugs.eclipse.org/bugs/show_bug.cgi?id=579360
+   *   https://github.com/eclipse-jdt/eclipse.jdt.core/issues/587
+   *
+   * TODO: reactivate when implemented or move to preview 5 with Java 21.
+   */
+  sealed interface I<T> permits D, E {}
+  final static class D<X> implements I<String> {}
+  final static class E<Y> implements I<Y> {}
+
+  static int testGenericSealedExhaustive(I<Integer> i) {
+    return switch (i) {
+      // Exhaustive as no D case possible!
+      case E<Integer> bi -> 42;
+    };
+  }
+}
index e7d3b95969fc7cc9aa22233a7023775ce2cb842c..20efe1723707e197dd7e54fe19ca1f9733ba77a5 100644 (file)
@@ -8,6 +8,7 @@
 package org.aspectj.systemtest.ajc1921;
 
 import junit.framework.Test;
+import org.aspectj.apache.bcel.Constants;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 import org.aspectj.testing.XMLBasedAjcTestCaseForJava21OrLater;
 
@@ -16,8 +17,78 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava21OrLater;
  */
 public class Ajc1921TestsJava extends XMLBasedAjcTestCaseForJava21OrLater {
 
-  public void testDummyJava21() {
-    //runTest("dummy Java 21");
+  public void testSwitchPatternMatchingPreview4Java() {
+    runTest("switch pattern matching preview 4 java");
+    checkVersion("SwitchPatternPreview4OK", Constants.MAJOR_21, Constants.MINOR_21);
+  }
+
+  public void testSwitchPatternMatchingPreview4Error() {
+    runTest("switch pattern matching preview 4 error");
+  }
+
+  public void testSwitchPatternMatchingPreview3Aspect() {
+    runTest("switch pattern matching preview 3 aspect");
+    checkVersion("SwitchPatternPreview3Aspect", Constants.MAJOR_21, Constants.MINOR_21);
+    checkVersion("Application", Constants.MAJOR_21, Constants.MINOR_21);
+    checkVersion("Shape", Constants.MAJOR_21, Constants.MINOR_21);
+    checkVersion("S", Constants.MAJOR_21, Constants.MINOR_21);
+  }
+
+  public void testSwitchPatternMatchingCaseLabelDominatedByPrecedingError() {
+    runTest("switch pattern matching error");
+  }
+
+  public void testSwitchPatternMatchingPreview3Error1() {
+    runTest("switch pattern matching preview 3 error 1");
+  }
+
+  public void testSwitchPatternMatchingPreview3Error2() {
+    runTest("switch pattern matching preview 3 error 2");
+  }
+
+  public void testRecordPatternsPreview1OK() {
+    // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/450
+    runTest("record patterns");
+  }
+
+  public void testRecordPatternsPreview1Error() {
+    // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/450 (fixed for preview 2 in Eclipse 2023-03, 4.27)
+    runTest("record patterns error");
+    checkVersion("RecordPatternsPreview1Error", Constants.MAJOR_21, Constants.MINOR_21);
+    checkVersion("Box", Constants.MAJOR_21, Constants.MINOR_21);
+  }
+
+  public void testRecordPatternsPreview1ExhaustivenessOK1() {
+    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected' twice,
+    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
+    // TODO: Remove redundant default clauses when fixed upstream
+    System.out.println("TODO: fully activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed");
+    runTest("record patterns exhaustiveness 1");
+  }
+
+  public void testRecordPatternsPreview1Aspect() {
+    runTest("record patterns aspect");
+  }
+
+  public void testRecordPatternsPreview1ExhaustivenessAspect() {
+    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected' twice,
+    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
+    // TODO: Remove redundant default clauses when fixed upstream
+    System.out.println("TODO: fully activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed");
+    runTest("record patterns exhaustiveness aspect");
+  }
+
+  public void testRecordPatternsPreview1ExhaustivenessError() {
+    // See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
+    runTest("record patterns exhaustiveness error");
+  }
+
+  public void testRecordPatternsPreview1ExhaustivenessOK2() {
+    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected',
+    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/398
+    // TODO: activate when fixed
+    System.out.println("TODO: activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/398 has been fixed");
+    //runTest("record patterns exhaustiveness 2");
   }
 
   public static Test suite() {
index 3c11149d3dea9dcb4aae8818a49a272940573490..113731a4f7b7a3ce4e54bc02aa0a352dde91b0d6 100644 (file)
@@ -15,77 +15,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Bugs1921Tests extends XMLBasedAjcTestCase {
 
-  public void testSwitchWith_Integer_MAX_VALUE() {
-    runTest("switch with Integer.MAX_VALUE case");
-  }
-
-  public void testParenthesisedExpressionWithAjKeyword() {
-    runTest("parenthesised expression with AspectJ keyword");
-  }
-
-  public void testInterfaceInnerAspectImplicitlyStatic() {
-    runTest("inner aspect of interface is implicitly static");
-  }
-
-  public void testExactArrayTypeMatchCompiledTogether() {
-    runTest("exact array type matching, aspect compiled together with target class");
-  }
-
-  public void testExactArrayTypeMatchCompiledSeparately() {
-    runTest("exact array type matching, aspect compiled separately from target class");
-  }
-
-  public void testFuzzyArrayTypeMatchCompiledTogether() {
-    runTest("fuzzy array type matching, aspect compiled together with target class");
-  }
-
-  public void testFuzzyArrayTypeMatchCompiledSeparately() {
-    runTest("fuzzy array type matching, aspect compiled separately from target class");
-  }
-
-  public void test_GitHub_214() {
-    runTest("ArrayIndexOutOfBoundsException with Xlint unorderedAdviceAtShadow=warning");
-  }
-
-  /**
-   * Add correct annotations to multiple ITD methods with the same name and same number of arguments, i.e. copy the
-   * annotations correctly from the aspect into the target class instead of falsely always copying the annotations (if
-   * any) from the first ITD method found.
-   * <p>
-   * See <a href="https://github.com/eclipse-aspectj/aspectj/issues/246">GitHub issue 246</a>.
-   */
-  public void test_GitHub_246() {
-    runTest("add correct annotations to multiple ITD methods with the same name and same number of arguments");
-  }
-
-  /**
-   * Make sure to create one {@code ajc$inlineAccessMethod} for identically named (overloaded) private aspect methods.
-   * <p>
-   * See <a href="https://github.com/eclipse-aspectj/aspectj/issues/250">GitHub issue 250</a>.
-   */
-  public void test_GitHub_250() {
-    runTest("correctly handle overloaded private methods in aspects");
-  }
-
-  /**
-   * If one generic method overrides another one with a narrower return type, avoid matching bridge methods.
-   * <p>
-   * See <a href="https://github.com/spring-projects/spring-framework/issues/27761">Spring GitHub issue 27761</a>.
-   * <p>
-   * This test uses an ASM-modified class file reproducing the problem seen in Spring in plain AspectJ. Before the
-   * bugfix, it fails with <b>"advice defined in RepositoryAspect has not been applied [Xlint:adviceDidNotMatch]".</b>
-   */
-  public void test_Spring_GitHub_27761() {
-    runTest("do not match bridge methods");
-  }
-
-  /**
-   * In 1.9.20, a regression bug occurred, matching negated types like '!void' and '!String' incorrectly.
-   * <p>
-   * See <a href="https://github.com/eclipse-aspectj/aspectj/issues/257">GitHub issue 257</a>.
-   */
-  public void test_GitHub_257() {
-    runTest("handle negated type patterns correctly");
+  public void testDummy() {
+    //runTest("dummy");
   }
 
   public static Test suite() {
index 1088aac63a5cc372483a9f122791c384a364566b..4b4de845d082f5e25060b9745ba7c01dabe7265d 100644 (file)
@@ -8,7 +8,6 @@
 package org.aspectj.systemtest.ajc1921;
 
 import junit.framework.Test;
-import org.aspectj.apache.bcel.Constants;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 import org.aspectj.testing.XMLBasedAjcTestCaseForJava21Only;
 
@@ -17,78 +16,8 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava21Only;
  */
 public class Java21PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava21Only {
 
-  public void testSwitchPatternMatchingPreview4Java() {
-    runTest("switch pattern matching preview 4 java");
-    checkVersion("SwitchPatternPreview4OK", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-  }
-
-  public void testSwitchPatternMatchingPreview4Error() {
-    runTest("switch pattern matching preview 4 error");
-  }
-
-  public void testSwitchPatternMatchingPreview3Aspect() {
-    runTest("switch pattern matching preview 3 aspect");
-    checkVersion("SwitchPatternPreview3Aspect", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-    checkVersion("Application", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-    checkVersion("Shape", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-    checkVersion("S", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-  }
-
-  public void testSwitchPatternMatchingCaseLabelDominatedByPrecedingError() {
-    runTest("switch pattern matching error");
-  }
-
-  public void testSwitchPatternMatchingPreview3Error1() {
-    runTest("switch pattern matching preview 3 error 1");
-  }
-
-  public void testSwitchPatternMatchingPreview3Error2() {
-    runTest("switch pattern matching preview 3 error 2");
-  }
-
-  public void testRecordPatternsPreview1OK() {
-    // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/450
-    runTest("record patterns");
-  }
-
-  public void testRecordPatternsPreview1Error() {
-    // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/450 (fixed for preview 2 in Eclipse 2023-03, 4.27)
-    runTest("record patterns error");
-    checkVersion("RecordPatternsPreview1Error", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-    checkVersion("Box", Constants.MAJOR_21, Constants.PREVIEW_MINOR_VERSION);
-  }
-
-  public void testRecordPatternsPreview1ExhaustivenessOK1() {
-    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected' twice,
-    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
-    // TODO: Remove redundant default clauses when fixed upstream
-    System.out.println("TODO: fully activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed");
-    runTest("record patterns exhaustiveness 1");
-  }
-
-  public void testRecordPatternsPreview1Aspect() {
-    runTest("record patterns aspect");
-  }
-
-  public void testRecordPatternsPreview1ExhaustivenessAspect() {
-    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected' twice,
-    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
-    // TODO: Remove redundant default clauses when fixed upstream
-    System.out.println("TODO: fully activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed");
-    runTest("record patterns exhaustiveness aspect");
-  }
-
-  public void testRecordPatternsPreview1ExhaustivenessError() {
-    // See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455
-    runTest("record patterns exhaustiveness error");
-  }
-
-  public void testRecordPatternsPreview1ExhaustivenessOK2() {
-    // Falsely throws 'An enhanced switch statement should be exhaustive; a default label expected',
-    // see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/398
-    // TODO: activate when fixed
-    System.out.println("TODO: activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/398 has been fixed");
-    //runTest("record patterns exhaustiveness 2");
+  public void testDummyPreviewJava21() {
+    //runTest("dummy preview Java 21");
   }
 
   public static Test suite() {
index 1199bb03a8657d269ca2108fad45b4151101c4ed..73f2bdf5b1075ee26a7df070bef2bf3cacc03413 100644 (file)
@@ -1,19 +1,31 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
 
 <!--
-  Java 20: no new final language features, only preview/incubator ones:
-    - "JEP 432:        Record Patterns (Second Preview)" (###)
-    - "JEP 433:        Pattern Matching for switch (Fourth Preview)" (###)
-    - "JEP 429:        Scoped Values (Incubator)" (API only)
-    - "JEP 436:        Virtual Threads (Second Preview)" (API only)
-    - "JEP 437:        Structured Concurrency (Second Incubator)" (API only)
+       JDK 21 (https://openjdk.org/projects/jdk/21/):
+               Language features:
+                       JEP 430: String Templates (Preview)
+                       JEP 440: Record Patterns
+                       JEP 441: Pattern Matching for switch
+                       JEP 443: Unnamed Patterns and Variables (Preview)
+                       JEP 445: Unnamed Classes and Instance Main Methods (Preview)
+               API or JVM only:
+                       JEP 431: Sequenced Collections
+                       JEP 439: Generational ZGC
+                       JEP 442: Foreign Function & Memory API (Third Preview)
+                       JEP 444: Virtual Threads
+                       JEP 446: Scoped Values (Preview)
+                       JEP 448: Vector API (Sixth Incubator)
+                       JEP 449: Deprecate the Windows 32-bit x86 Port for Removal
+                       JEP 451: Prepare to Disallow the Dynamic Loading of Agents
+                       JEP 452: Key Encapsulation Mechanism API
+                       JEP 453: Structured Concurrency (Preview)
 -->
 <suite>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
-       <ajc-test dir="features1920/java20" vm="21" title="switch pattern matching preview 4 java">
-               <compile files="SwitchPatternPreview4OK.java" options="--enable-preview -21" />
-               <run class="SwitchPatternPreview4OK" vmargs="--enable-preview">
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
+       <ajc-test dir="features1921/java21" vm="21" title="switch pattern matching preview 4 java">
+               <compile files="SwitchPatternPreview4OK.java" options="-21" />
+               <run class="SwitchPatternPreview4OK" vmargs="">
                        <message></message>
                        <stdout>
                                <line text="null" />
                                <line text="Sealed sub-class A" />
                                <line text="Sealed sub-class B" />
                                <line text="Sealed sub-record C" />
+                               <!-- TODO: Activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 is fixed. -->
+                               <!--
                                <line text="absolute value 1: -1" />
                                <line text="other integer: 0" />
                                <line text="positive integer: 42" />
                                <line text="other integer: -99" />
                                <line text="positive integer: 123" />
                                <line text="value unavailable: null" />
+                               -->
+                               <line text="42" />
                        </stdout>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
        <ajc-test dir="features1920/java20" vm="21" title="switch pattern matching preview 4 error">
-               <compile files="SwitchPatternPreview4Error.java" options="--enable-preview -21">
+               <compile files="SwitchPatternPreview4Error.java" options="-21">
                        <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
                        <message kind="error" file="SwitchPatternPreview4Error.java" text="This case label is dominated by one of the preceding case labels"/>
                </compile>
        </ajc-test>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
-       <ajc-test dir="features1919/java19" vm="21" title="switch pattern matching preview 3 aspect">
-               <compile files="SwitchPatternPreview3Aspect.aj" options="--enable-preview -21" />
-               <run class="Application" vmargs="--enable-preview">
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
+       <ajc-test dir="features1921/java21" vm="21" title="switch pattern matching preview 3 aspect">
+               <compile files="SwitchPatternPreview3Aspect.aj" options="-21" />
+               <run class="Application" vmargs="">
                        <stdout>
                                <line text="null" />
                                <line text="int 123" />
                                <line text="Sealed sub-class A" />
                                <line text="Sealed sub-class B" />
                                <line text="Sealed sub-record C" />
+                               <!-- TODO: Activate when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 is fixed. -->
+                               <!--
                                <line text="absolute value 1: -1" />
                                <line text="other integer: 0" />
                                <line text="positive integer: 42" />
                                <line text="other integer: -99" />
                                <line text="positive integer: 123" />
                                <line text="value unavailable: null" />
+                               -->
                        </stdout>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
        <ajc-test dir="features198/java17" vm="21" title="switch pattern matching error">
-               <compile files="SwitchPatternError.java" options="--enable-preview -21">
+               <compile files="SwitchPatternError.java" options="-21">
                        <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
                        <message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case labels"/>
                </compile>
        </ajc-test>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="switch pattern matching preview 3 error 1">
-               <compile files="SwitchPatternPreview3Error1.java" options="--enable-preview -21">
-                       <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
-                       <message kind="error" file="SwitchPatternPreview3Error1.java" text="This case label is dominated by one of the preceding case labels"/>
+               <compile files="SwitchPatternPreview3Error1.java" options="-21">
+                       <!-- No more error message as of Java 21 -->
+                       <!--<message kind="error" file="SwitchPatternPreview3Error1.java" text="This case label is dominated by one of the preceding case labels"/>-->
                </compile>
        </ajc-test>
 
-       <!-- Java ?? final, Java 17, 18, 19, 20 preview -->
+       <!-- Java 21 final, Java 17, 18, 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="switch pattern matching preview 3 error 2">
-               <compile files="SwitchPatternPreview3Error2.java" options="--enable-preview -21">
+               <compile files="SwitchPatternPreview3Error2.java" options="-21">
                        <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
                        <message kind="error" file="SwitchPatternPreview3Error2.java" text="This case label is dominated by one of the preceding case labels"/>
                </compile>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns">
-               <compile files="RecordPatternsPreview1OK.java" options="--enable-preview -21"/>
+               <compile files="RecordPatternsPreview1OK.java" options="-21"/>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns error">
-               <compile files="RecordPatternsPreview1Error.java" options="--enable-preview -21">
+               <compile files="RecordPatternsPreview1Error.java" options="-21">
                        <!-- https://github.com/eclipse-jdt/eclipse.jdt.core/issues/450 (fixed for preview 2 in Eclipse 2023-03, 4.27) -->
                        <!--
                        <message kind="error" file="RecordPatternsPreview1Error.java" text="Raw types are not allowed in record patterns"/>
                        <message kind="error" file="RecordPatternsPreview1Error.java" text="Raw types are not allowed in record patterns"/>
                        -->
                </compile>
-               <run class="RecordPatternsPreview1Error" vmargs="--enable-preview">
+               <run class="RecordPatternsPreview1Error" vmargs="">
                        <stdout>
                                <line text="I'm a box"/>
                                <line text="I'm a box"/>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns exhaustiveness 1">
-               <compile files="RecordPatternsPreview1ExhaustivenessOK1.java" options="--enable-preview -21"/>
-               <run class="RecordPatternsPreview1ExhaustivenessOK1" vmargs="--enable-preview">
+               <compile files="RecordPatternsPreview1ExhaustivenessOK1.java" options="-21"/>
+               <run class="RecordPatternsPreview1ExhaustivenessOK1" vmargs="">
                        <stdout>
                                <line text="y"/>
                                <line text="a"/>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns exhaustiveness aspect">
-               <compile files="RecordPatternsPreview1ExhaustivenessAspect.aj" options="--enable-preview -21"/>
+               <compile files="RecordPatternsPreview1ExhaustivenessAspect.aj" options="-21"/>
                <!-- TODO: Remove redundant default clauses when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed -->
-               <run class="RecordPatternsPreview1ExhaustivenessAspect" vmargs="--enable-preview">
+               <run class="RecordPatternsPreview1ExhaustivenessAspect" vmargs="">
                        <stdout>
                                <line text="y"/>
                                <line text="a"/>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns aspect">
-               <compile files="RecordPatternsPreview1Aspect.aj" options="--enable-preview -21"/>
-               <run class="RecordPatternsPreview1Aspect" vmargs="--enable-preview">
+               <compile files="RecordPatternsPreview1Aspect.aj" options="-21"/>
+               <run class="RecordPatternsPreview1Aspect" vmargs="">
                        <stdout>
                                <line text="9"/>
                                <line text="14"/>
                </run>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns exhaustiveness error">
-               <compile files="RecordPatternsPreview1ExhaustivenessError.java" options="--enable-preview -21">
+               <compile files="RecordPatternsPreview1ExhaustivenessError.java" options="-21">
                        <message kind="error" file="RecordPatternsPreview1ExhaustivenessError.java" text="An enhanced switch statement should be exhaustive; a default label expected"/>
                </compile>
        </ajc-test>
 
-       <!-- Java ?? final, Java 19, 20 preview -->
+       <!-- Java 21 final, Java 19, 20 preview -->
        <ajc-test dir="features1919/java19" vm="21" title="record patterns exhaustiveness 2">
-               <compile files="RecordPatternsPreview1ExhaustivenessOK2.java" options="--enable-preview -21"/>
-               <run class="RecordPatternsPreview1ExhaustivenessOK2" vmargs="--enable-preview">
+               <compile files="RecordPatternsPreview1ExhaustivenessOK2.java" options="-21"/>
+               <run class="RecordPatternsPreview1ExhaustivenessOK2" vmargs="">
                        <stdout>
                                <line text="Bob 12"/>
                        </stdout>
                </run>
        </ajc-test>
 
-       <!-- RuntimeException in BcelWeaver, see https://github.com/eclipse/org.aspectj/issues/190 -->
-       <ajc-test dir="bugs1920/github_190" vm="1.5" title="switch with Integer.MAX_VALUE case">
-               <compile files="SwitchCaseWith_Integer_MAX_VALUE.java" options="-1.5 -showWeaveInfo">
-                       <message kind="weave" text="Join point 'method-execution(java.lang.String SwitchCaseWith_Integer_MAX_VALUE.switchTest(int))'"/>
-                </compile>
-               <run class="SwitchCaseWith_Integer_MAX_VALUE">
-                       <stdout>
-                               <line text="execution(String SwitchCaseWith_Integer_MAX_VALUE.switchTest(int))"/>
-                               <line text="CASE_1"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               'Syntax error, insert "Expression" to complete Expression' when compiling parenthesised expressions
-               containing AspectJ keywords, e.g. '(before)', see https://github.com/eclipse/org.aspectj/issues/20
-       -->
-       <ajc-test dir="bugs1920/github_20" vm="1.5" title="parenthesised expression with AspectJ keyword">
-               <compile files="ParenthesisedAJKeywords.java" options="-1.5 -showWeaveInfo"/>
-               <run class="ParenthesisedAJKeywords">
-                       <stdout>
-                               <line text="before"/>
-                               <line text="after"/>
-                               <line text="around"/>
-                               <line text="aspect"/>
-                               <line text="pointcut"/>
-                               <line text="declare"/>
-                               <line text="privileged"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               'inner aspects must be static' when compiling an interface with an inner aspect which was not explicitly declared
-               static, see https://github.com/eclipse/org.aspectj/issues/162
-       -->
-       <ajc-test dir="bugs1920/github_162" vm="1.5" title="inner aspect of interface is implicitly static">
-               <compile files="InterfaceWithInnerClass.java" options="-1.5 -showWeaveInfo">
-                       <message kind="weave" text="method-execution(int InterfaceWithInnerClass$ImplicitlyStatic.getNumber())' in Type 'InterfaceWithInnerClass$ImplicitlyStatic'"/>
-                       <message kind="weave" text="method-execution(void InterfaceWithInnerClass$ImplicitlyStatic.main(java.lang.String[]))' in Type 'InterfaceWithInnerClass$ImplicitlyStatic'"/>
-               </compile>
-               <run class="InterfaceWithInnerClass$ImplicitlyStatic">
-                       <stdout>
-                               <line text="execution(void InterfaceWithInnerClass.ImplicitlyStatic.main(String[]))"/>
-                               <line text="execution(int InterfaceWithInnerClass.ImplicitlyStatic.getNumber())"/>
-                               <line text="11"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               When compiling aspect and target class together, matching works as expected,
-               see https://github.com/eclipse/org.aspectj/issues/24
-       -->
-       <ajc-test dir="bugs1920/github_24" vm="1.5" title="exact array type matching, aspect compiled together with target class">
-               <compile files="ExactlyMatchingAspect.aj MaybeMissingClass.java" options="-1.5 -showWeaveInfo">
-                       <!-- Even before the bugfix, in this case weaving worked as expected -->
-                       <message kind="weave" text="method-execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                       <message kind="weave" text="method-execution(int MaybeMissingClass.f4())"/>
-                       <message kind="weave" text="method-execution(int[] MaybeMissingClass.f5())"/>
-                       <message kind="weave" text="method-execution(int[][] MaybeMissingClass.f6())"/>
-               </compile>
-               <run class="MaybeMissingClass">
-                       <stdout>
-                               <line text="MaybeMissingClass.f1"/>
-                               <line text="execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                               <line text="MaybeMissingClass.f2"/>
-                               <line text="execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                               <line text="MaybeMissingClass.f3"/>
-                               <line text="execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                               <line text="MaybeMissingClass.f4"/>
-                               <line text="execution(int MaybeMissingClass.f4())"/>
-                               <line text="MaybeMissingClass.f5"/>
-                               <line text="execution(int[] MaybeMissingClass.f5())"/>
-                               <line text="MaybeMissingClass.f6"/>
-                               <line text="execution(int[][] MaybeMissingClass.f6())"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               When compiling aspect and target class separately, too many joinpoints are matched,
-               see https://github.com/eclipse/org.aspectj/issues/24
-       -->
-       <ajc-test dir="bugs1920/github_24" vm="1.5" title="exact array type matching, aspect compiled separately from target class">
-               <compile files="ExactlyMatchingAspect.aj" options="-1.5 -showWeaveInfo" outjar="aspect.jar">
-                       <message kind="warning" text="no match for this type name: MaybeMissingClass [Xlint:invalidAbsoluteTypeName]"/>
-                       <message kind="warning" text="advice defined in ExactlyMatchingAspect has not been applied [Xlint:adviceDidNotMatch]"/>
-               </compile>
-               <compile files="MaybeMissingClass.java" options="-1.5 -showWeaveInfo" aspectpath="aspect.jar">
-                       <!-- Before the bugfix, f1 would be woven twice, f2 not at all-->
-                       <message kind="weave" text="method-execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                       <message kind="weave" text="method-execution(int MaybeMissingClass.f4())"/>
-                       <message kind="weave" text="method-execution(int[] MaybeMissingClass.f5())"/>
-                       <message kind="weave" text="method-execution(int[][] MaybeMissingClass.f6())"/>
-               </compile>
-               <run class="MaybeMissingClass" classpath="aspect.jar">
-                       <stdout>
-                               <line text="MaybeMissingClass.f1"/>
-                               <line text="execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                               <line text="MaybeMissingClass.f2"/>
-                               <line text="execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                               <line text="MaybeMissingClass.f3"/>
-                               <line text="execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                               <line text="MaybeMissingClass.f4"/>
-                               <line text="execution(int MaybeMissingClass.f4())"/>
-                               <line text="MaybeMissingClass.f5"/>
-                               <line text="execution(int[] MaybeMissingClass.f5())"/>
-                               <line text="MaybeMissingClass.f6"/>
-                               <line text="execution(int[][] MaybeMissingClass.f6())"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               When compiling aspect and target class together, too many joinpoints are matched,
-               see https://github.com/eclipse/org.aspectj/issues/24
-       -->
-       <ajc-test dir="bugs1920/github_24" vm="1.5" title="fuzzy array type matching, aspect compiled together with target class">
-               <compile files="FuzzilyMatchingAspect.aj MaybeMissingClass.java" options="-1.5 -showWeaveInfo">
-                       <!-- Before the bugfix, both f1 and f2 would be woven twice -->
-                       <message kind="weave" text="method-execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                       <message kind="weave" text="method-execution(int MaybeMissingClass.f4())"/>
-                       <message kind="weave" text="method-execution(int[] MaybeMissingClass.f5())"/>
-                       <message kind="weave" text="method-execution(int[][] MaybeMissingClass.f6())"/>
-               </compile>
-               <run class="MaybeMissingClass">
-                       <stdout>
-                               <line text="MaybeMissingClass.f1"/>
-                               <line text="execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                               <line text="MaybeMissingClass.f2"/>
-                               <line text="execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                               <line text="MaybeMissingClass.f3"/>
-                               <line text="execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                               <line text="MaybeMissingClass.f4"/>
-                               <line text="execution(int MaybeMissingClass.f4())"/>
-                               <line text="MaybeMissingClass.f5"/>
-                               <line text="execution(int[] MaybeMissingClass.f5())"/>
-                               <line text="MaybeMissingClass.f6"/>
-                               <line text="execution(int[][] MaybeMissingClass.f6())"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               When compiling aspect and target class separately, too many joinpoints are matched,
-               see https://github.com/eclipse/org.aspectj/issues/24
-       -->
-       <ajc-test dir="bugs1920/github_24" vm="1.5" title="fuzzy array type matching, aspect compiled separately from target class">
-               <compile files="FuzzilyMatchingAspect.aj" options="-1.5 -showWeaveInfo" outjar="aspect.jar">
-                       <message kind="warning" text="advice defined in FuzzilyMatchingAspect has not been applied [Xlint:adviceDidNotMatch]"/>
-               </compile>
-               <compile files="MaybeMissingClass.java" options="-1.5 -showWeaveInfo" aspectpath="aspect.jar">
-                       <!-- Before the bugfix, both f1 and f2 would be woven twice -->
-                       <message kind="weave" text="method-execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                       <message kind="weave" text="method-execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                       <message kind="weave" text="method-execution(int MaybeMissingClass.f4())"/>
-                       <message kind="weave" text="method-execution(int[] MaybeMissingClass.f5())"/>
-                       <message kind="weave" text="method-execution(int[][] MaybeMissingClass.f6())"/>
-               </compile>
-               <run class="MaybeMissingClass" classpath="aspect.jar">
-                       <stdout>
-                               <line text="MaybeMissingClass.f1"/>
-                               <line text="execution(MaybeMissingClass MaybeMissingClass.f1())"/>
-                               <line text="MaybeMissingClass.f2"/>
-                               <line text="execution(MaybeMissingClass[] MaybeMissingClass.f2())"/>
-                               <line text="MaybeMissingClass.f3"/>
-                               <line text="execution(MaybeMissingClass[][] MaybeMissingClass.f3())"/>
-                               <line text="MaybeMissingClass.f4"/>
-                               <line text="execution(int MaybeMissingClass.f4())"/>
-                               <line text="MaybeMissingClass.f5"/>
-                               <line text="execution(int[] MaybeMissingClass.f5())"/>
-                               <line text="MaybeMissingClass.f6"/>
-                               <line text="execution(int[][] MaybeMissingClass.f6())"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!--
-               https://github.com/eclipse/org.aspectj/issues/214
-               https://github.com/mojohaus/aspectj-maven-plugin/issues/164
-               Problem with multiple, subsequent weaving steps and '-Xlint:warning' or '-Xlint:unorderedAdviceAtShadow=warning'
-                       java.lang.ArrayIndexOutOfBoundsException: 1
-                       [ERROR] at org.aspectj.weaver.bcel.BcelShadow.prepareForMungers(BcelShadow.java:379)
-                       [ERROR] at org.aspectj.weaver.Shadow.implement(Shadow.java:546)
-       -->
-       <ajc-test dir="bugs1920/github_214" vm="1.5" title="ArrayIndexOutOfBoundsException with Xlint unorderedAdviceAtShadow=warning">
-               <compile files="FirstAspect.java MarkerOne.java" options="-1.8 -showWeaveInfo -Xlint:warning" outjar="first-aspect.jar">
-                       <message kind="warning" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
-                       <message kind="warning" text="advice defined in FirstAspect has not been applied [Xlint:adviceDidNotMatch]"/>
-               </compile>
-               <compile files="Application.java MarkerTwo.java" options="-1.5 -showWeaveInfo -Xlint:warning" classpath="$sandbox/first-aspect.jar" outjar="application.jar"/>
-               <compile files="SecondAspect.java" options="-1.5 -showWeaveInfo -Xlint:warning" aspectpath="first-aspect.jar" inpath="application.jar" outjar="second-aspect.jar">
-                       <message kind="warning" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
-                       <message kind="warning" text="at this shadow method-execution(void Application.greet(java.lang.String)) no precedence is specified between advice applying from aspect FirstAspect and aspect SecondAspect [Xlint:unorderedAdviceAtShadow]"/>
-                       <message kind="warning" text="can not implement lazyTjp at joinpoint method-execution(void Application.greet(java.lang.String)) because of advice conflicts, see secondary locations to find conflicting advice [Xlint:multipleAdviceStoppingLazyTjp]"/>
-                       <message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by around advice from 'SecondAspect'"/>
-                       <message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by before advice from 'FirstAspect'"/>
-               </compile>
-               <run class="Application" classpath="$sandbox/second-aspect.jar,$sandbox/first-aspect.jar">
-                       <stdout>
-                               <line text="FirstAspect: execution(void Application.greet(String))"/>
-                               <line text="SecondAspect: execution(void Application.greet(String))"/>
-                               <line text="Hello world!"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!-- https://github.com/eclipse-aspectj/aspectj/issues/246 -->
-       <ajc-test dir="bugs1920/github_246" vm="8" title="add correct annotations to multiple ITD methods with the same name and same number of arguments">
-               <compile files="First.java Second.java App.java ITDAspect.aj" options="-8"/>
-               <run class="App">
-                       <stdout>
-                               <line text="[@Second()] public int App.foo(int[])"/>
-                               <line text="[@First()] public void App.foo(java.lang.String)"/>
-                               <line text="[] public void App.foo(java.lang.String[])"/>
-                               <line text="[@First(), @Second()] public void App.foo(java.lang.Object)"/>
-                               <line text="[@Second()] public int App.foo(int)"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!-- https://github.com/eclipse-aspectj/aspectj/issues/250 -->
-       <ajc-test dir="bugs1920/github_250" vm="8" title="correctly handle overloaded private methods in aspects">
-               <compile files="MyAspect.aj" options="-8"/>
-               <run class="MyAspect">
-                       <stdout>
-                               <line text="execution(void Application.doSomething())"/>
-                               <line text="1 / one"/>
-                               <line text="execution(void Application.doSomething())"/>
-                               <line text="2"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!-- https://github.com/spring-projects/spring-framework/issues/27761 -->
-       <ajc-test dir="bugs1921/gh_spring_27761" vm="8" title="do not match bridge methods">
-               <!-- (1) Use ASM to generate JpaRepository class with reordered methods -->
-               <compile files="JpaRepositoryDump.java" options="-8"/>
-               <run class="JpaRepositoryDump" options="$sandbox"/>
-               <file deletefile="JpaRepositoryDump.class"/>
-               <!-- (2) Use AJC to compile the remaining classes and run the test -->
-               <compile files="RepositoryAspect.aj" options="-8"/>
-               <run class="RepositoryAspect">
-                       <stdout>
-                               <line text="execution(List RepositoryImpl.saveAll(Iterable))"/>
-                               <line text="Saving [One, Two, Three]"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
-       <!-- https://github.com/eclipse-aspectj/aspectj/issues/257 -->
-       <ajc-test dir="bugs1921/gh_257" vm="8" title="handle negated type patterns correctly">
-               <compile files="NegatedTypeAspect.aj" options="-8"/>
-               <run class="NegatedTypeAspect">
-                       <stdout>
-                               <line text="[SETTER] execution(void Person.setId(int))"/>
-                               <line text="[SETTER] execution(void Person.setFirstName(String))"/>
-                               <line text="[SETTER] execution(void Person.setLastName(String))"/>
-                               <line text="Person(id=11, lastName='Curie', firstName='Marie')"/>
-                               <line text="[GETTER] execution(int Person.getId())"/>
-                               <line text="[NON-STRING GETTER] execution(int Person.getId())"/>
-                               <line text="[NON-STRING-ARRAY GETTER] execution(int Person.getId())"/>
-                               <line text="[NON-STRING-ARRAY-ARRAY GETTER] execution(int Person.getId())"/>
-                               <line text="[GETTER] execution(String Person.getFirstName())"/>
-                               <line text="[NON-STRING-ARRAY GETTER] execution(String Person.getFirstName())"/>
-                               <line text="[NON-STRING-ARRAY-ARRAY GETTER] execution(String Person.getFirstName())"/>
-                               <line text="[GETTER] execution(String Person.getLastName())"/>
-                               <line text="[NON-STRING-ARRAY GETTER] execution(String Person.getLastName())"/>
-                               <line text="[NON-STRING-ARRAY-ARRAY GETTER] execution(String Person.getLastName())"/>
-                               <line text="Marie Curie"/>
-                               <line text="[SETTER] execution(void Person.setFullName(String))"/>
-                               <line text="[SETTER] execution(void Person.setId(int))"/>
-                               <line text="Person(id=22, lastName='Einstein', firstName='Albert')"/>
-                               <line text="Einstein, Albert"/>
-                               <line text="[NON-STRING GETTER] execution(void Person.getVoid())"/>
-                               <line text="[NON-STRING-ARRAY GETTER] execution(void Person.getVoid())"/>
-                               <line text="[NON-STRING-ARRAY-ARRAY GETTER] execution(void Person.getVoid())"/>
-                               <line text="[GETTER] execution(String[] Person.getStringArray())"/>
-                               <line text="[NON-STRING GETTER] execution(String[] Person.getStringArray())"/>
-                               <line text="[STRING-ARRAY GETTER] execution(String[] Person.getStringArray())"/>
-                               <line text="[NON-STRING-ARRAY-ARRAY GETTER] execution(String[] Person.getStringArray())"/>
-                               <line text="[Hello, world]"/>
-                               <line text="[GETTER] execution(String[][] Person.getStringArrayArray())"/>
-                               <line text="[NON-STRING GETTER] execution(String[][] Person.getStringArrayArray())"/>
-                               <line text="[NON-STRING-ARRAY GETTER] execution(String[][] Person.getStringArrayArray())"/>
-                               <line text="[[Hello, world], [Hallo, Welt]]"/>
-                               <line text="AspectJ rules!"/>
-                       </stdout>
-               </run>
-       </ajc-test>
-
 </suite>