提交 a7b01851 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #2707 from KostyaSha/JEKINS-40863-remoting

[FIXED JENKINS-40863] Don't use javax.servlet imports for remoting call
......@@ -24,7 +24,6 @@
package hudson.tasks;
import hudson.FilePath;
import hudson.Functions;
import hudson.Util;
import hudson.Extension;
import hudson.model.AbstractProject;
......@@ -35,6 +34,7 @@ import java.io.ObjectStreamException;
import hudson.util.LineEndingConversion;
import jenkins.security.MasterToSlaveCallable;
import net.sf.json.JSONObject;
import org.apache.commons.lang.SystemUtils;
import org.jenkinsci.Symbol;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
......@@ -153,8 +153,9 @@ public class Shell extends CommandInterpreter {
*/
@Deprecated
public String getShellOrDefault() {
if(shell==null)
return Functions.isWindows() ?"sh":"/bin/sh";
if (shell == null) {
return SystemUtils.IS_OS_WINDOWS ? "sh" : "/bin/sh";
}
return shell;
}
......@@ -229,7 +230,7 @@ public class Shell extends CommandInterpreter {
private static final long serialVersionUID = 1L;
public String call() throws IOException {
return Functions.isWindows() ? "sh" : "/bin/sh";
return SystemUtils.IS_OS_WINDOWS ? "sh" : "/bin/sh";
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册