From f960cf8a624d85c2397988af21f8f4b1828ec555 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 18:42:14 +0100 Subject: [PATCH 1/9] Avoid mutating final fields --- gradle/libs.versions.toml | 2 +- .../options/TestDiscoveryOptionsMixin.java | 46 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 14a65f89b9e7..85e274142fd1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -53,7 +53,7 @@ junit4 = { module = "junit:junit", version = { require = "[4.12,)", prefer = "4. kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.2" } log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4j" } -maven = { module = "org.apache.maven:apache-maven", version = "3.9.11" } +maven = { module = "org.apache.maven:apache-maven", version = "4.0.0-rc-5" } mavenSurefirePlugin = { module = "org.apache.maven.plugins:maven-surefire-plugin", version.ref = "surefire" } memoryfilesystem = { module = "com.github.marschall:memoryfilesystem", version = "2.8.2" } mockito-bom = { module = "org.mockito:mockito-bom", version = "5.20.0" } diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java index 0d44fc76d336..42ff8eb12c98 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java @@ -68,55 +68,55 @@ public static class SelectorOptions { @Option(names = { "-u", "--select-uri" }, paramLabel = "URI", arity = "1..*", converter = SelectorConverter.Uri.class, description = "Select a URI for test discovery. This option can be repeated.") - private final List selectedUris = new ArrayList<>(); + private List selectedUris = new ArrayList<>(); @Option(names = { "-f", "--select-file" }, paramLabel = "FILE", arity = "1..*", converter = SelectorConverter.File.class, // description = "Select a file for test discovery. " + "The line and column numbers can be provided as URI query parameters (e.g. foo.txt?line=12&column=34). " + "This option can be repeated.") - private final List selectedFiles = new ArrayList<>(); + private List selectedFiles = new ArrayList<>(); @Option(names = { "-d", "--select-directory" }, paramLabel = "DIR", arity = "1..*", converter = SelectorConverter.Directory.class, description = "Select a directory for test discovery. This option can be repeated.") - private final List selectedDirectories = new ArrayList<>(); + private List selectedDirectories = new ArrayList<>(); @Option(names = { "-o", "--select-module" }, paramLabel = "NAME", arity = "1..*", converter = SelectorConverter.Module.class, description = "Select single module for test discovery. This option can be repeated.") - private final List selectedModules = new ArrayList<>(); + private List selectedModules = new ArrayList<>(); @Option(names = { "-p", "--select-package" }, paramLabel = "PKG", arity = "1..*", converter = SelectorConverter.Package.class, description = "Select a package for test discovery. This option can be repeated.") - private final List selectedPackages = new ArrayList<>(); + private List selectedPackages = new ArrayList<>(); @Option(names = { "-c", "--select-class" }, paramLabel = "CLASS", arity = "1..*", converter = SelectorConverter.Class.class, description = "Select a class for test discovery. This option can be repeated.") - private final List selectedClasses = new ArrayList<>(); + private List selectedClasses = new ArrayList<>(); @Option(names = { "-m", "--select-method" }, paramLabel = "NAME", arity = "1..*", converter = SelectorConverter.Method.class, description = "Select a method for test discovery. This option can be repeated.") - private final List selectedMethods = new ArrayList<>(); + private List selectedMethods = new ArrayList<>(); @Option(names = { "-r", "--select-resource" }, paramLabel = "RESOURCE", arity = "1..*", converter = SelectorConverter.ClasspathResource.class, description = "Select a classpath resource for test discovery. This option can be repeated.") - private final List selectedClasspathResources = new ArrayList<>(); + private List selectedClasspathResources = new ArrayList<>(); @Option(names = { "-i", "--select-iteration" }, paramLabel = "PREFIX:VALUE[INDEX(..INDEX)?(,INDEX(..INDEX)?)*]", arity = "1..*", converter = SelectorConverter.Iteration.class, // description = "Select iterations for test discovery via a prefixed identifier and a list of indexes or index ranges " + "(e.g. method:com.acme.Foo#m()[1..2] selects the first and second iteration of the m() method in the com.acme.Foo class). " + "This option can be repeated.") - private final List selectedIterations = new ArrayList<>(); + private List selectedIterations = new ArrayList<>(); @Option(names = { "--select-unique-id", "--uid" }, paramLabel = "UNIQUE-ID", arity = "1..*", converter = SelectorConverter.UniqueId.class, // description = "Select a unique id for test discovery. This option can be repeated.") - private final List selectedUniqueIds = new ArrayList<>(); + private List selectedUniqueIds = new ArrayList<>(); @Option(names = "--select", paramLabel = "PREFIX:VALUE", arity = "1..*", converter = SelectorConverter.Identifier.class, // description = "Select via a prefixed identifier (e.g. method:com.acme.Foo#m selects the m() method in the com.acme.Foo class). " + "This option can be repeated.") - private final List selectorIdentifiers = new ArrayList<>(); + private List selectorIdentifiers = new ArrayList<>(); SelectorOptions() { } @@ -147,46 +147,46 @@ public static class FilterOptions { + "names that begin with \"Test\" or end with \"Test\" or \"Tests\". " // + "When this option is repeated, all patterns will be combined using OR semantics. " // + "Default: ${DEFAULT-VALUE}") - private final List includeClassNamePatterns = new ArrayList<>(); + private List includeClassNamePatterns = new ArrayList<>(); @Option(names = { "-N", "--exclude-classname" }, paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to exclude those classes whose fully qualified names match. " // + "When this option is repeated, all patterns will be combined using OR semantics.") - private final List excludeClassNamePatterns = new ArrayList<>(); + private List excludeClassNamePatterns = new ArrayList<>(); @Option(names = "--include-package", paramLabel = "PKG", arity = "1", description = "?Provide a package to be included in the test run. This option can be repeated.") - private final List includePackages = new ArrayList<>(); + private List includePackages = new ArrayList<>(); @Option(names = "--exclude-package", paramLabel = "PKG", arity = "1", description = "Provide a package to be excluded from the test run. This option can be repeated.") - private final List excludePackages = new ArrayList<>(); + private List excludePackages = new ArrayList<>(); @Option(names = "--include-methodname", paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to include only methods whose fully qualified names without parameters match. " // + "When this option is repeated, all patterns will be combined using OR semantics.") - private final List includeMethodNamePatterns = new ArrayList<>(); + private List includeMethodNamePatterns = new ArrayList<>(); @Option(names = "--exclude-methodname", paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to exclude those methods whose fully qualified names without parameters match. " // + "When this option is repeated, all patterns will be combined using OR semantics.") - private final List excludeMethodNamePatterns = new ArrayList<>(); + private List excludeMethodNamePatterns = new ArrayList<>(); @Option(names = { "-t", "--include-tag" }, paramLabel = "TAG", arity = "1", description = "Provide a tag or tag expression to include only tests whose tags match. " + // "When this option is repeated, all patterns will be combined using OR semantics.") - private final List includedTags = new ArrayList<>(); + private List includedTags = new ArrayList<>(); @Option(names = { "-T", "--exclude-tag" }, paramLabel = "TAG", arity = "1", description = "Provide a tag or tag expression to exclude those tests whose tags match. " + // "When this option is repeated, all patterns will be combined using OR semantics.") - private final List excludedTags = new ArrayList<>(); + private List excludedTags = new ArrayList<>(); @Option(names = { "-e", "--include-engine" }, paramLabel = "ID", arity = "1", description = "Provide the ID of an engine to be included in the test run. This option can be repeated.") - private final List includedEngines = new ArrayList<>(); + private List includedEngines = new ArrayList<>(); @Option(names = { "-E", "--exclude-engine" }, paramLabel = "ID", arity = "1", description = "Provide the ID of an engine to be excluded from the test run. This option can be repeated.") - private final List excludedEngines = new ArrayList<>(); + private List excludedEngines = new ArrayList<>(); private void applyTo(TestDiscoveryOptions result) { result.setIncludedClassNamePatterns(this.includeClassNamePatterns); @@ -207,10 +207,10 @@ public static class RuntimeConfigurationOptions { @Option(names = { "-" + CP_OPTION, "--classpath", "--class-path" }, converter = ClasspathEntriesConverter.class, paramLabel = "PATH", arity = "1", description = "Provide additional classpath entries " + "-- for example, for adding engines and their dependencies. This option can be repeated.") - private final List additionalClasspathEntries = new ArrayList<>(); + private List additionalClasspathEntries = new ArrayList<>(); // Implementation note: the @Option annotation is on a setter method to allow validation. - private final Map configurationParameters = new LinkedHashMap<>(); + private Map configurationParameters = new LinkedHashMap<>(); @Option(names = "--config-resource", paramLabel = "PATH", arity = "1", description = "Set configuration parameters for test discovery and execution via a classpath resource. This option can be repeated.") private List configurationParametersResources = new ArrayList<>(); From e5e9d2a0f6f7c763dfa2bc38ac43eb53fd41a105 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 19:36:51 +0100 Subject: [PATCH 2/9] Disable failing test --- .../java/platform/tooling/support/tests/MavenStarterTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java index 1a998b2c96a2..d50bc564f80f 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java @@ -21,6 +21,7 @@ import de.skuzzle.test.snapshots.junit5.EnableSnapshotTests; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.junit.platform.tests.process.OutputFiles; @@ -65,6 +66,7 @@ void verifyJupiterStarterProject(@FilePrefix("maven") OutputFiles outputFiles, S } @Test + @Disabled("Maven 4 issue?") void runOnlyOneMethodInClassTemplate(@FilePrefix("maven") OutputFiles outputFiles) throws Exception { var result = runMaven(outputFiles, "test", "-Dtest=CalculatorParameterizedClassTests$Inner#regularTest"); From 26deb5faf06647bce0a09becefd0d3f3bf365e79 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 20:10:04 +0100 Subject: [PATCH 3/9] Back to Maven 3.9.11 with final field mutation --- gradle/libs.versions.toml | 2 +- .../src/main/java/platform/tooling/support/ProcessStarters.java | 1 + .../java/platform/tooling/support/tests/MavenStarterTests.java | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 85e274142fd1..14a65f89b9e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -53,7 +53,7 @@ junit4 = { module = "junit:junit", version = { require = "[4.12,)", prefer = "4. kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.2" } log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4j" } -maven = { module = "org.apache.maven:apache-maven", version = "4.0.0-rc-5" } +maven = { module = "org.apache.maven:apache-maven", version = "3.9.11" } mavenSurefirePlugin = { module = "org.apache.maven.plugins:maven-surefire-plugin", version.ref = "surefire" } memoryfilesystem = { module = "com.github.marschall:memoryfilesystem", version = "2.8.2" } mockito-bom = { module = "org.mockito:mockito-bom", version = "5.20.0" } diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java index 0fc656e669c8..95f47b2dbb60 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java @@ -59,6 +59,7 @@ public static ProcessStarter maven(Path javaHome) { .executable(Path.of(System.getProperty("mavenDistribution")).resolve("bin").resolve( windowsOrOtherExecutable("mvn.cmd", "mvn")).toAbsolutePath()) // .putEnvironment("JAVA_HOME", javaHome) // + .putEnvironment("MAVEN_OPTS", "--enable-final-field-mutation=ALL-UNNAMED") // .addArguments("-Djunit.version=" + Helper.version()); } diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java index d50bc564f80f..1a998b2c96a2 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java @@ -21,7 +21,6 @@ import de.skuzzle.test.snapshots.junit5.EnableSnapshotTests; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.junit.platform.tests.process.OutputFiles; @@ -66,7 +65,6 @@ void verifyJupiterStarterProject(@FilePrefix("maven") OutputFiles outputFiles, S } @Test - @Disabled("Maven 4 issue?") void runOnlyOneMethodInClassTemplate(@FilePrefix("maven") OutputFiles outputFiles) throws Exception { var result = runMaven(outputFiles, "test", "-Dtest=CalculatorParameterizedClassTests$Inner#regularTest"); From fa3e8746a1869a98a8e5e85c5fb02f8c7a8b9924 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 20:10:25 +0100 Subject: [PATCH 4/9] Remove `final` field modifier --- .../console/options/TestConsoleOutputOptionsMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/TestConsoleOutputOptionsMixin.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/TestConsoleOutputOptionsMixin.java index 489f6910961b..e9e3b7e1c410 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/TestConsoleOutputOptionsMixin.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/TestConsoleOutputOptionsMixin.java @@ -41,11 +41,11 @@ public static class ConsoleOutputOptions { @Option(names = "--details", paramLabel = "MODE", defaultValue = DEFAULT_DETAILS_NAME, description = "Select an output details mode for when tests are executed. " // + "Use one of: ${COMPLETION-CANDIDATES}. If 'none' is selected, " // + "then only the summary and test failures are shown. Default: ${DEFAULT-VALUE}.") - private final Details details = DEFAULT_DETAILS; + private Details details = DEFAULT_DETAILS; @Option(names = "--details-theme", paramLabel = "THEME", description = "Select an output details tree theme for when tests are executed. " + "Use one of: ${COMPLETION-CANDIDATES}. Default is detected based on default character encoding.") - private final Theme theme = DEFAULT_THEME; + private Theme theme = DEFAULT_THEME; @Option(names = "--redirect-stdout", paramLabel = "FILE", description = "Redirect test output to stdout to a file.") private @Nullable Path stdout; From bdde471b6ee6f2a9dd92ffece22f8057c3d8c9e1 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 20:24:44 +0100 Subject: [PATCH 5/9] Enable final field mutation for Maven only on JDK 26 or higher --- .../java/platform/tooling/support/ProcessStarters.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java index 95f47b2dbb60..fb72dd2398ff 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java @@ -55,12 +55,15 @@ public static ProcessStarter maven() { } public static ProcessStarter maven(Path javaHome) { - return new ProcessStarter() // + var starter = new ProcessStarter() // .executable(Path.of(System.getProperty("mavenDistribution")).resolve("bin").resolve( windowsOrOtherExecutable("mvn.cmd", "mvn")).toAbsolutePath()) // .putEnvironment("JAVA_HOME", javaHome) // - .putEnvironment("MAVEN_OPTS", "--enable-final-field-mutation=ALL-UNNAMED") // .addArguments("-Djunit.version=" + Helper.version()); + if (Runtime.version().feature() >= 26) { + starter.putEnvironment("MAVEN_OPTS", "--enable-final-field-mutation=ALL-UNNAMED"); + } + return starter; } private static String windowsOrOtherExecutable(String cmdOrExe, String other) { From eb73079093e930cb510733ffd1ea9f9f4cbcc93f Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 21:01:57 +0100 Subject: [PATCH 6/9] Update MavenEnvVars --- .../platform/tooling/support/ProcessStarters.java | 10 +--------- .../tooling/support/tests/MavenEnvVars.java | 14 +++++++++++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java index fb72dd2398ff..1b0fdb2859d8 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ProcessStarters.java @@ -50,20 +50,12 @@ public static ProcessStarter gradlew() { .addArguments("-PjunitVersion=" + Helper.version()); } - public static ProcessStarter maven() { - return maven(currentJdkHome()); - } - public static ProcessStarter maven(Path javaHome) { - var starter = new ProcessStarter() // + return new ProcessStarter() // .executable(Path.of(System.getProperty("mavenDistribution")).resolve("bin").resolve( windowsOrOtherExecutable("mvn.cmd", "mvn")).toAbsolutePath()) // .putEnvironment("JAVA_HOME", javaHome) // .addArguments("-Djunit.version=" + Helper.version()); - if (Runtime.version().feature() >= 26) { - starter.putEnvironment("MAVEN_OPTS", "--enable-final-field-mutation=ALL-UNNAMED"); - } - return starter; } private static String windowsOrOtherExecutable(String cmdOrExe, String other) { diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java index 115ea298e815..7e2e441c8dde 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java @@ -10,19 +10,27 @@ package platform.tooling.support.tests; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import org.junit.jupiter.api.condition.JRE; final class MavenEnvVars { - private static final Map FOR_JDK24_AND_LATER = Map.of("MAVEN_OPTS", String.join(" ", // + private static final List FOR_JDK24_AND_LATER = List.of( // "--enable-native-access=ALL-UNNAMED", // https://issues.apache.org/jira/browse/MNG-8248 "--sun-misc-unsafe-memory-access=allow" // https://issues.apache.org/jira/browse/MNG-8399 - )); + ); + private static final List FOR_JDK26_AND_LATER = List.of( // + "--enable-final-field-mutation=ALL-UNNAMED" // https://github.com/junit-team/junit-framework/issues/5173 + ); static Map forJre(JRE jre) { - return jre.compareTo(JRE.JAVA_24) >= 0 ? FOR_JDK24_AND_LATER : Map.of(); + var list = new ArrayList(); + if (jre.compareTo(JRE.JAVA_24) >= 0) list.addAll(FOR_JDK24_AND_LATER); + if (jre.compareTo(JRE.JAVA_26) >= 0) list.addAll(FOR_JDK26_AND_LATER); + return list.isEmpty() ? Map.of() : Map.of("MAVEN_OPTS", String.join(" ", list)); } private MavenEnvVars() { From c47cc8747569b5fcbbee543c1a9a53c604bc1335 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 21:08:55 +0100 Subject: [PATCH 7/9] Spotless! --- .../java/platform/tooling/support/tests/MavenEnvVars.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java index 7e2e441c8dde..8ca1d03a9489 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java @@ -28,8 +28,10 @@ final class MavenEnvVars { static Map forJre(JRE jre) { var list = new ArrayList(); - if (jre.compareTo(JRE.JAVA_24) >= 0) list.addAll(FOR_JDK24_AND_LATER); - if (jre.compareTo(JRE.JAVA_26) >= 0) list.addAll(FOR_JDK26_AND_LATER); + if (jre.compareTo(JRE.JAVA_24) >= 0) + list.addAll(FOR_JDK24_AND_LATER); + if (jre.compareTo(JRE.JAVA_26) >= 0) + list.addAll(FOR_JDK26_AND_LATER); return list.isEmpty() ? Map.of() : Map.of("MAVEN_OPTS", String.join(" ", list)); } From e34493580a03ce9a9b4ca1980c73dd0dc31aecec Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sat, 22 Nov 2025 23:58:20 +0100 Subject: [PATCH 8/9] Exclude lower build numbers, less than 25 --- .../java/platform/tooling/support/tests/MavenEnvVars.java | 8 ++++++-- .../tooling/support/tests/UnalignedClasspathTests.java | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java index 8ca1d03a9489..3390935d71f0 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java @@ -30,8 +30,12 @@ static Map forJre(JRE jre) { var list = new ArrayList(); if (jre.compareTo(JRE.JAVA_24) >= 0) list.addAll(FOR_JDK24_AND_LATER); - if (jre.compareTo(JRE.JAVA_26) >= 0) - list.addAll(FOR_JDK26_AND_LATER); + if (jre.compareTo(JRE.JAVA_26) >= 0) { + // exclude "leyden" and "valhalla" builds + if (Runtime.version().build().orElse(0) >= 25) { + list.addAll(FOR_JDK26_AND_LATER); + } + } return list.isEmpty() ? Map.of() : Map.of("MAVEN_OPTS", String.join(" ", list)); } diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/UnalignedClasspathTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/UnalignedClasspathTests.java index c68e03811024..9db82883e399 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/UnalignedClasspathTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/UnalignedClasspathTests.java @@ -51,8 +51,8 @@ void verifyErrorMessageForUnalignedClasspath(JRE jre, Path javaHome, @TempDir Pa .workingDir(copyToWorkspace(Projects.JUPITER_STARTER, workspace)) // .addArguments(localMavenRepo.toCliArgument(), "-Dmaven.repo=" + MavenRepo.dir()) // .addArguments("-Dsnapshot.repo.url=" + mavenRepoProxy.getBaseUri()) // - .addArguments("-Djunit.platform.commons.version=1.11.4").addArguments("--update-snapshots", - "--batch-mode", "verify") // + .addArguments("-Djunit.platform.commons.version=1.11.4") // + .addArguments("--update-snapshots", "--batch-mode", "verify") // .putEnvironment(MavenEnvVars.forJre(jre)) // .redirectOutput(outputFiles); var result = starter.startAndWait(); From 50bb93601673fb0ba867c66e0779f1241640c08b Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Sun, 23 Nov 2025 16:39:04 +0100 Subject: [PATCH 9/9] Create release notes for 6.0.2 --- .../docs/asciidoc/release-notes/index.adoc | 2 + .../release-notes/release-notes-6.0.2.adoc | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 documentation/src/docs/asciidoc/release-notes/release-notes-6.0.2.adoc diff --git a/documentation/src/docs/asciidoc/release-notes/index.adoc b/documentation/src/docs/asciidoc/release-notes/index.adoc index a13ddd5d1a9b..c7f8737025c6 100644 --- a/documentation/src/docs/asciidoc/release-notes/index.adoc +++ b/documentation/src/docs/asciidoc/release-notes/index.adoc @@ -21,6 +21,8 @@ include::{basedir}/release-notes-6.1.0-M2.adoc[] include::{basedir}/release-notes-6.1.0-M1.adoc[] +include::{basedir}/release-notes-6.0.2.adoc[] + include::{basedir}/release-notes-6.0.1.adoc[] include::{basedir}/release-notes-6.0.0.adoc[] diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-6.0.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-6.0.2.adoc new file mode 100644 index 000000000000..a0ba07732b62 --- /dev/null +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-6.0.2.adoc @@ -0,0 +1,67 @@ +[[release-notes-6.0.2]] +== 6.0.2 + +*Date of Release:* ❓ + +*Scope:* ❓ + +For a complete list of all _closed_ issues and pull requests for this release, consult the +link:{junit-framework-repo}+/milestone/113?closed=1+[6.0.2] milestone page in the JUnit +repository on GitHub. + + +[[release-notes-6.0.2-junit-platform]] +=== JUnit Platform + +[[release-notes-6.0.2-junit-platform-bug-fixes]] +==== Bug Fixes + +* Make `ConsoleLauncher` compatible with JDK 26 by avoiding final field mutations. + +[[release-notes-6.0.2-junit-platform-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-6.0.2-junit-platform-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-6.0.2-junit-jupiter]] +=== JUnit Jupiter + +[[release-notes-6.0.2-junit-jupiter-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-6.0.2-junit-jupiter-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-6.0.2-junit-jupiter-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-6.0.2-junit-vintage]] +=== JUnit Vintage + +[[release-notes-6.0.2-junit-vintage-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-6.0.2-junit-vintage-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-6.0.2-junit-vintage-new-features-and-improvements]] +==== New Features and Improvements + +* ❓