Skip to content
Permalink
Browse files
Merge pull request #3267 from jglick/getEffectiveBrowser-JENKINS-46041
[JENKINS-46041] If guessBrowser fails, return null and move on
  • Loading branch information
oleg-nenashev committed Jan 26, 2018
2 parents 0d1f80b + 6a3e60e commit bab0dbf91432a057b7b0cda894ce202b32d58322
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 bab0dbf

Please sign in to comment.