未验证 提交 6a3e60ef 编写于 作者: J Jesse Glick

[JENKINS-46041] If guessBrowser fails, return null and move on.

上级 0d1f80ba
......@@ -54,6 +54,8 @@ import java.io.IOException;
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 @@ import org.kohsuke.stapler.export.ExportedBean;
@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 abstract class SCM implements Describable<SCM>, ExtensionPoint {
}
return autoBrowserHolder.get();
} else {
return guessBrowser();
try {
return guessBrowser();
} catch (RuntimeException x) {
LOGGER.log(Level.WARNING, null, x);
return null;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册