Deprecate Functions#getServerName (#6545)

This commit is contained in:
Basil Crow authored and GitHub committed 2022-05-07 15:28:30 -07:00
1 parent b9fcd2ae02
commit aaa6f730f6
1 file changed
+5 -1
+5 -1
View File
@@ -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.
* <p>
* 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.