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 authored and GitHub committed 2023-12-23 16:49:49 -07:00
1 parent f60c1b4872
commit df03159afe
1 file changed
+22 -5
@@ -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