Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore JCasC compatibility for JNLPLauncher.tunnel #8793

Merged
merged 2 commits into from
Dec 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions core/src/main/java/hudson/slaves/JNLPLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
* @author Stephen Connolly
* @author Kohsuke Kawaguchi
*/
@SuppressWarnings("deprecation") // see comments about CasC
public class JNLPLauncher extends ComputerLauncher {
/**
* Deprecated (only used with deprecated {@code -jnlpUrl} mode), but cannot mark it as such without breaking CasC.
*/
@DataBoundSetter
@CheckForNull
public String tunnel;

Expand All @@ -67,11 +67,9 @@ public class JNLPLauncher extends ComputerLauncher {
@Deprecated
public final transient String vmargs = null;

@Deprecated
@NonNull
private RemotingWorkDirSettings workDirSettings = RemotingWorkDirSettings.getEnabledDefaults();

@Deprecated
private boolean webSocket;

/**
Expand Down Expand Up @@ -131,7 +129,9 @@ protected Object readResolve() {
return this;
}

@Deprecated
/**
* Deprecated (only used with deprecated {@code -jnlpUrl} mode), but cannot mark it as such without breaking CasC.
*/
public RemotingWorkDirSettings getWorkDirSettings() {
return workDirSettings;
}
Expand All @@ -149,7 +149,9 @@ public boolean isLaunchSupported() {
return false;
}

@Deprecated
/**
* Deprecated (only used with deprecated {@code -jnlpUrl} mode), but cannot mark it as such without breaking CasC.
*/
public boolean isWebSocket() {
return webSocket;
}
Expand All @@ -162,6 +164,21 @@ public void setWebSocket(boolean webSocket) {
this.webSocket = webSocket;
}

/**
* Deprecated (only used with deprecated {@code -jnlpUrl} mode), but cannot mark it as such without breaking CasC.
*/
public String getTunnel() {
return tunnel;
}

/**
* Deprecated (only used with deprecated {@code -jnlpUrl} mode), but cannot mark it as such without breaking CasC.
*/
@DataBoundSetter
public void setTunnel(String tunnel) {
this.tunnel = tunnel;
}

@Override
public void launch(SlaveComputer computer, TaskListener listener) {
// do nothing as we cannot self start
Expand Down
Loading