Restore JCasC compatibility for `JNLPLauncher.tunnel` (#8793)

* Restore JCasC compatibility for `JNLPLauncher.tunnel`

* Also removing `@Deprecated` on fields & getters
This commit is contained in:
Jesse Glick 2023-12-23 18:49:49 -05:00 committed by GitHub
parent f60c1b4872
commit df03159afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 5 deletions

View File

@ -53,11 +53,11 @@ import org.kohsuke.stapler.DataBoundSetter;
* @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;
@ -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;
/**
@ -131,7 +129,9 @@ public class JNLPLauncher extends ComputerLauncher {
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;
}
@ -149,7 +149,9 @@ public class JNLPLauncher extends ComputerLauncher {
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;
}
@ -162,6 +164,21 @@ public class JNLPLauncher extends ComputerLauncher {
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