From aaa6f730f69998e2fd19ebf431f653120022e7b9 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 7 May 2022 15:28:30 -0700 Subject: [PATCH] Deprecate `Functions#getServerName` (#6545) --- core/src/main/java/hudson/Functions.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 0d523fdb22..ee00f67e75 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -73,6 +73,7 @@ import hudson.security.captcha.CaptchaSupport; import hudson.security.csrf.CrumbIssuer; import hudson.slaves.Cloud; import hudson.slaves.ComputerLauncher; +import hudson.slaves.JNLPLauncher; import hudson.slaves.NodeProperty; import hudson.slaves.NodePropertyDescriptor; import hudson.slaves.RetentionStrategy; @@ -1866,9 +1867,12 @@ public class Functions { /** * Obtains the host name of the Hudson server that clients can use to talk back to. *

- * This is primarily used in {@code jenkins-agent.jnlp.jelly} to specify the destination + * This was primarily used in {@code jenkins-agent.jnlp.jelly} to specify the destination * that the agents talk to. + * + * @deprecated use {@link JNLPLauncher#getInboundAgentUrl} */ + @Deprecated public String getServerName() { // Try to infer this from the configured root URL. // This makes it work correctly when Hudson runs behind a reverse proxy.