From 7e6c5740ec3902023f7acebb48deaa9bae5df9f1 Mon Sep 17 00:00:00 2001 From: Adrien Lecharpentier Date: Fri, 24 Oct 2025 17:29:31 +0200 Subject: [PATCH] Enable Java 25 support (#11148) * Bump winstone to get Jetty 12.1.1 * Accept to start Jenkins with Java 25 * Build with Java 25 * Remove inaccurate javadoc that includes an incorrect link The Javadoc comment said: > When executing the resulting Callable, it executes > FileCallable#act(FileCallable) on this FilePath. The FileCallable interface does not have an `act(FileCallable)` method. That absence causes the Javadoc generation to fail on Java 25. There is a `FilePath.act(FileCallable)` method that could be inserted instead, but I'm not confident the comment would then be correct. Testing done: Confirmed that Javadoc generation fails on Java 25 without this change. Confirmed that Javadoc generation passes on Java 25 with this change. (cherry picked from commit 3fdf9c18db2690feb0d26681ddd444db4f865eb6) * Temporary fix for javadoc build * Bump winstone to 8.14 * Update Jenkinsfile --------- Co-authored-by: Bruno Verachten Co-authored-by: Mark Waite Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> --- Jenkinsfile | 6 +++--- war/src/main/java/executable/Main.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dbeccc82ad..9e25b4a7a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ properties([ def axes = [ platforms: ['linux', 'windows'], - jdks: [17, 21], + jdks: [17, 21, 25], ] stage('Record build') { @@ -34,7 +34,7 @@ stage('Record build') { sh "launchable verify && launchable record build --name ${launchableName} --source jenkinsci/jenkins=." axes.values().combinations { def (platform, jdk) = it - if (platform == 'windows' && jdk != 17) { + if (platform == 'windows' && jdk != axes.jdks.last()) { return // unnecessary use of hardware } def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt" @@ -60,7 +60,7 @@ def builds = [:] axes.values().combinations { def (platform, jdk) = it - if (platform == 'windows' && jdk != 17) { + if (platform == 'windows' && jdk != axes.jdks.last()) { return // unnecessary use of hardware } builds["${platform}-jdk${jdk}"] = { diff --git a/war/src/main/java/executable/Main.java b/war/src/main/java/executable/Main.java index 8a8cf67a87..2eeed2622d 100644 --- a/war/src/main/java/executable/Main.java +++ b/war/src/main/java/executable/Main.java @@ -76,7 +76,7 @@ public class Main { * This list must remain synchronized with the one in {@code * JavaVersionRecommendationAdminMonitor}. */ - private static final NavigableSet SUPPORTED_JAVA_VERSIONS = new TreeSet<>(List.of(17, 21)); + private static final NavigableSet SUPPORTED_JAVA_VERSIONS = new TreeSet<>(List.of(17, 21, 25)); /** * Sets custom session cookie name.