Skip to content

Commit

Permalink
[JENKINS-46041] If guessBrowser fails, return null and move on.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Jan 25, 2018
1 parent 0d1f80b commit 6a3e60e
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 6a3e60e

Please sign in to comment.