提交 695a3d7d 编写于 作者: O Oleg Nenashev

Merge pull request #1724 from oleg-nenashev/AbstractProject_constructor_NPE

[FIXED JENKINS-28654] - Check null nodes condition in AbstractProject constructor
......@@ -266,7 +266,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
buildMixIn = createBuildMixIn();
builds = buildMixIn.getRunMap();
if(Jenkins.getInstance()!=null && !Jenkins.getInstance().getNodes().isEmpty()) {
final Jenkins j = Jenkins.getInstance();
final List<Node> nodes = j != null ? j.getNodes() : null;
if(nodes!=null && !nodes.isEmpty()) {
// if a new job is configured with Hudson that already has slave nodes
// make it roamable by default
canRoam = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册