Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
with
5 additions
and
4 deletions.
-
+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"; |
|
|
} |
|
|
} |
|
|
|
|
|