Skip to content
Permalink
Browse files

[FIXED JENKINS-40863] Don't use javax.servlet imports for remoting call

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
  • Loading branch information
KostyaSha committed Jan 6, 2017
1 parent bbafe6e commit 9d29d65033ee71af4109dd15bcb0d02f3a0694e0
Showing with 5 additions and 4 deletions.
  1. +5 −4 core/src/main/java/hudson/tasks/Shell.java
@@ -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 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 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;
}

@@ -229,7 +230,7 @@ public FormValidation doCheckShell(@QueryParameter String value) {
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";
}
}

0 comments on commit 9d29d65

Please sign in to comment.
You can’t perform that action at this time.