Skip to content
Permalink
Browse files
[JENKINS-46041] If guessBrowser fails, return null and move on.
  • Loading branch information
jglick committed Jan 25, 2018
1 parent 0d1f80b commit 6a3e60ef71900704e552a295a802c2caf29a871c
Showing with 10 additions and 1 deletion.
  1. +10 −1 core/src/main/java/hudson/scm/SCM.java
@@ -54,6 +54,8 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -86,6 +88,8 @@
@ExportedBean
public abstract class SCM implements Describable<SCM>, ExtensionPoint {

private static final Logger LOGGER = Logger.getLogger(SCM.class.getName());

/** JENKINS-35098: discouraged */
@SuppressWarnings("FieldMayBeFinal")
private static boolean useAutoBrowserHolder = SystemProperties.getBoolean(SCM.class.getName() + ".useAutoBrowserHolder");
@@ -143,7 +147,12 @@ public String getType() {
}
return autoBrowserHolder.get();
} else {
return guessBrowser();
try {
return guessBrowser();
} catch (RuntimeException x) {
LOGGER.log(Level.WARNING, null, x);
return null;
}
}
}

0 comments on commit 6a3e60e

Please sign in to comment.