Skip to content

Commit

Permalink
[FIXED JENKINS-40863] Don't use javax.servlet imports for remoting call
Browse files Browse the repository at this point in the history
Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
  • Loading branch information
KostyaSha committed Jan 6, 2017
1 parent bbafe6e commit 9d29d65
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/src/main/java/hudson/tasks/Shell.java
Expand Up @@ -24,7 +24,6 @@
package hudson.tasks;

import hudson.FilePath;
import hudson.Functions;
import hudson.Util;
import hudson.Extension;
import hudson.model.AbstractProject;
Expand All @@ -35,6 +34,7 @@
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;
Expand Down Expand Up @@ -153,8 +153,9 @@ public String getShell() {
*/
@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;
}

Expand Down Expand Up @@ -229,7 +230,7 @@ private static final class Shellinterpreter extends MasterToSlaveCallable<String
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";
}
}

Expand Down

0 comments on commit 9d29d65

Please sign in to comment.