From 4714dea05beb8f5b5ebba6277baa1ca440281d46 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Mon, 27 Nov 2023 11:17:27 +0700 Subject: [PATCH] Reactivate some tests on JDK 21 after upstream fix https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 has finally been fixed. Signed-off-by: Alexander Kriegisch --- .../java21/SwitchPatternPreview3Aspect.aj | 9 --------- .../features1921/java21/SwitchPatternPreview4OK.java | 12 ------------ .../org/aspectj/systemtest/ajc1921/ajc1921.xml | 8 +------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/tests/features1921/java21/SwitchPatternPreview3Aspect.aj b/tests/features1921/java21/SwitchPatternPreview3Aspect.aj index cab9a2bcd..ae147dad7 100644 --- a/tests/features1921/java21/SwitchPatternPreview3Aspect.aj +++ b/tests/features1921/java21/SwitchPatternPreview3Aspect.aj @@ -31,14 +31,6 @@ aspect SwitchPatternPreview3Aspect { } 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; @@ -47,7 +39,6 @@ aspect SwitchPatternPreview3Aspect { default -> "other integer: " + i; } ); - */ return proceed(i); } } diff --git a/tests/features1921/java21/SwitchPatternPreview4OK.java b/tests/features1921/java21/SwitchPatternPreview4OK.java index c9caf7eca..40854a007 100644 --- a/tests/features1921/java21/SwitchPatternPreview4OK.java +++ b/tests/features1921/java21/SwitchPatternPreview4OK.java @@ -29,15 +29,12 @@ public class SwitchPatternPreview4OK { // 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())); } @@ -105,15 +102,6 @@ public class SwitchPatternPreview4OK { } */ - /** - * 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); diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml index ec4682216..42a58da0c 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml @@ -26,7 +26,7 @@ - + @@ -40,15 +40,12 @@ - - @@ -79,15 +76,12 @@ - - -- 2.39.5