Skip to content

Commit

Permalink
Merge pull request #3267 from jglick/getEffectiveBrowser-JENKINS-46041
Browse files Browse the repository at this point in the history
[JENKINS-46041] If guessBrowser fails, return null and move on
  • Loading branch information
oleg-nenashev committed Jan 26, 2018
2 parents 0d1f80b + 6a3e60e commit bab0dbf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/main/java/hudson/scm/SCM.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit bab0dbf

Please sign in to comment.