提交 04aa4f17 编写于 作者: K Kanstantsin Shautsou

Adjust Deprecation tree according to Slave javadocs.

Slave constructor wants implementations to use setters,
but AbstractCloudSlave has no corresponding constructor.
上级 1d0d8069
......@@ -159,6 +159,11 @@ public abstract class Slave extends Node implements Serializable {
*/
private String userId;
/**
* Use {@link #Slave(String, String, ComputerLauncher)} and set the rest through setters.
* @deprecated since FIXME
*/
@Deprecated
public Slave(String name, String nodeDescription, String remoteFS, String numExecutors,
Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws FormException, IOException {
this(name,nodeDescription,remoteFS,Util.tryParseNumber(numExecutors, 1).intValue(),mode,labelString,launcher,retentionStrategy, nodeProperties);
......
......@@ -30,6 +30,7 @@ import hudson.model.Slave;
import hudson.model.TaskListener;
import hudson.util.StreamTaskListener;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;
......@@ -43,11 +44,33 @@ import java.util.logging.Logger;
* @since 1.382
*/
public abstract class AbstractCloudSlave extends Slave {
public AbstractCloudSlave(String name, String nodeDescription, String remoteFS, String numExecutors, Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws FormException, IOException {
public AbstractCloudSlave(@Nonnull String name, String remoteFS, ComputerLauncher launcher)
throws FormException, IOException {
super(name, remoteFS, launcher);
}
/**
* Use {@link #AbstractCloudSlave(java.lang.String, java.lang.String, hudson.slaves.ComputerLauncher)}
* @deprecated since FIXME
*/
@Deprecated
public AbstractCloudSlave(String name, String nodeDescription, String remoteFS, String numExecutors,
Mode mode, String labelString, ComputerLauncher launcher,
RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties)
throws FormException, IOException {
super(name, nodeDescription, remoteFS, numExecutors, mode, labelString, launcher, retentionStrategy, nodeProperties);
}
public AbstractCloudSlave(String name, String nodeDescription, String remoteFS, int numExecutors, Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws FormException, IOException {
/**
* Use {@link #AbstractCloudSlave(java.lang.String, java.lang.String, hudson.slaves.ComputerLauncher)}
* @deprecated since FIXME
*/
@Deprecated
public AbstractCloudSlave(String name, String nodeDescription, String remoteFS, int numExecutors,
Mode mode, String labelString, ComputerLauncher launcher,
RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties)
throws FormException, IOException {
super(name, nodeDescription, remoteFS, numExecutors, mode, labelString, launcher, retentionStrategy, nodeProperties);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册