Skip to content

Commit

Permalink
[JENKINS-21520] transient NoClassDefFoundError: javax/servlet/Servlet…
Browse files Browse the repository at this point in the history
…Exception
  • Loading branch information
ndeloof committed Jul 9, 2015
1 parent 886a322 commit f7e7c19
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
Expand Up @@ -9,7 +9,6 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.EnvVars;
import hudson.FilePath;
import hudson.Functions;
import hudson.Launcher;
import com.google.common.collect.Lists;
import hudson.Launcher.LocalLauncher;
Expand Down Expand Up @@ -79,7 +78,7 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl {
private StandardCredentials defaultCredentials;

private void warnIfWindowsTemporaryDirNameHasSpaces() {
if (!Functions.isWindows()) {
if (!isWindows()) {
return;
}
String[] varsToCheck = {"TEMP", "TMP"};
Expand Down Expand Up @@ -644,7 +643,7 @@ public ObjectId revParse(String revName) throws GitException, InterruptedExcepti
* See https://github.com/msysgit/msysgit/issues/36 where I filed this as a bug to msysgit.
**/
private String sanitize(String arg) {
if (Functions.isWindows())
if (!isWindows())
arg = '"'+arg+'"';
return arg;
}
Expand Down Expand Up @@ -2530,4 +2529,10 @@ private String getGitCredentialsURL(URIish u, StandardCredentials cred) {
* best to avoid git interactively asking for credentials, there are many of other cases where git may hang.
*/
public static final int TIMEOUT = Integer.getInteger(Git.class.getName() + ".timeOut", 10);

private boolean isWindows() {
return File.pathSeparatorChar != ';';
}


}

0 comments on commit f7e7c19

Please sign in to comment.