From acaf364e6825e4e3c298d5c8a956c848fd5cdd5b Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sun, 20 Jul 2025 16:09:10 -0600 Subject: [PATCH] Prepare for Java 25 release Sep 16, 2025 The Jenkins project strives to support new Java Long Term Support releases soon after they are released. Java 25 is the next LTS release and is scheduled to release Sep 16, 2025. The Jenkins project hopes to compile and test Jenkins core and the top 200 Jenkins plugins with Java 25 before Oct 31, 2025. Without this change, the plugin does not compile with Java 24. We expect Java 25 will be a superset of Java 24, so let's fix compilation with Java 24 even though Jenkins does not support Java 24. Also fixes a spotless formatting issue by updating the parent pom. Supersedes pull requests: * https://github.com/jenkinsci/gitlab-branch-source-plugin/pull/492 * https://github.com/jenkinsci/gitlab-branch-source-plugin/pull/491 Testing done: * Confirmed that `mvn spotless:apply` does not change formatting with either Java 17 or Java 21 * Confirmed that `mvn clean verify` passes on Linux with Java 24 --- pom.xml | 2 +- .../jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a9224a67..32703b93 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 5.7 + 5.18 io.jenkins.plugins diff --git a/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java b/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java index 2c73e37b..e9e48341 100644 --- a/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java +++ b/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java @@ -342,8 +342,7 @@ private String getProjectName(GitLabApi gitLabApi, int projectNamingStrategy, Pr String fullPath = project.getPathWithNamespace(); String projectName; switch (projectNamingStrategy) { - default: - // for legacy reasons default naming strategy is set to Full Project path + default: // for legacy reasons default naming strategy is set to Full Project path case 1: projectName = fullPath; break;