未验证 提交 118fe330 编写于 作者: T Tim Jacomb 提交者: GitHub

Merge pull request #4564 from ventojna/spotbugs-null

Fixed spotbugs NP_NULL_ON_SOME_PATH
......@@ -309,7 +309,7 @@ public class ExtensionList<T> extends AbstractList<T> implements OnMaster {
private List<ExtensionComponent<T>> ensureLoaded() {
if(extensions!=null)
return extensions; // already loaded
if (jenkins.getInitLevel().compareTo(InitMilestone.PLUGINS_PREPARED)<0)
if (jenkins == null || jenkins.getInitLevel().compareTo(InitMilestone.PLUGINS_PREPARED) < 0)
return legacyInstances; // can't perform the auto discovery until all plugins are loaded, so just make the legacy instances visible
synchronized (getLoadLock()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册