From 3326bf565c268692aee3717a6abd4af0a7a5835b Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 24 May 2025 12:10:21 -0600 Subject: [PATCH] Restore BitbucketEndpointConfiguration.normalizeServerUrl() for compatibility Blue Ocean Bitbucket plugin depends on this plugin and uses the BitbucketEndpointConfiguration.normalizeServerUrl method. Rather than require a new release of Blue Ocean, let's retain compatibility by restoring that method and marking it as deprecated. Detected in: * https://github.com/jenkinsci/bom/issues/5076 * https://github.com/jenkinsci/bom/pull/5088 Testing done: mvn -Dtest=BitbucketSCMNavigatorTest,BitbucketEndpointConfigurationTest,BitbucketServerEndpointTest,BitbucketSCMNavigatorTest clean verify --- .../endpoints/BitbucketEndpointConfiguration.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfiguration.java b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfiguration.java index 9696df15d..e84386223 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfiguration.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfiguration.java @@ -291,6 +291,20 @@ public synchronized AbstractBitbucketEndpoint getDefaultEndpoint() { * * @param serverURL the server URL. * @return the normalized server URL. + * @deprecated + * @see #normalizeServerURL + */ + @CheckForNull + @Deprecated + public static String normalizeServerUrl(@CheckForNull String serverURL) { + return normalizeServerURL(serverURL); + } + + /** + * Fix a server URL. + * + * @param serverURL the server URL. + * @return the normalized server URL. */ @CheckForNull public static String normalizeServerURL(@CheckForNull String serverURL) {