From 62e70e853a7ba2aecf129e8fa6d34a6aca0ed347 Mon Sep 17 00:00:00 2001 From: Stephan Herrmann Date: Sun, 15 Sep 2024 18:06:01 +0200 Subject: [PATCH] [javac] some differences ecj <-> javac regarding 'recent' features + fix arguments of javac invocations + remove a forgotten test filter relates to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2959 --- .../tests/compiler/regression/AbstractRegressionTest.java | 6 +++--- .../jdt/core/tests/compiler/regression/ArrayTest.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java index bf74dcdc203..3549e190085 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java @@ -715,15 +715,15 @@ boolean skip(JavacCompiler compiler) { static JavacTestOptions forRelease(String release) { JavacTestOptions options = new JavacTestOptions(Long.parseLong(release)); if (isJRE9Plus) - options.setCompilerOptions("-release "+release); + options.setCompilerOptions("--release "+release); else - options.setCompilerOptions("-source 1."+release+" -target 1."+release); + options.setCompilerOptions("--source 1."+release+" --target 1."+release); return options; } @java.lang.SuppressWarnings("synthetic-access") static JavacTestOptions forRelease(String release, String additionalOptions) { JavacTestOptions options = new JavacTestOptions(Long.parseLong(release)); - String result = isJRE9Plus ? "-release "+release : "-source 1."+release+" -target 1."+release; + String result = isJRE9Plus ? "--release "+release : "--source 1."+release+" --target 1."+release; if (additionalOptions != null) result = result + " " + additionalOptions; options.setCompilerOptions(result); diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java index 002e38b6a1d..729752045ce 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java @@ -28,7 +28,7 @@ public class ArrayTest extends AbstractRegressionTest { static { - TESTS_NUMBERS = new int[] { 1 }; +// TESTS_NUMBERS = new int[] { 1 }; } public ArrayTest(String name) { super(name);