提交 71543638 编写于 作者: C Christoph Kutzinski

This helps a lot when mocking AbstractProject in unit tests, because so I...

This helps a lot when mocking AbstractProject in unit tests, because so I don't have to suppress the constructor with PowerMockito
上级 20bd2fca
...@@ -266,7 +266,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -266,7 +266,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
protected AbstractProject(ItemGroup parent, String name) { protected AbstractProject(ItemGroup parent, String name) {
super(parent,name); super(parent,name);
if(!Jenkins.getInstance().getNodes().isEmpty()) { if(Jenkins.getInstance()!=null && !Jenkins.getInstance().getNodes().isEmpty()) {
// if a new job is configured with Hudson that already has slave nodes // if a new job is configured with Hudson that already has slave nodes
// make it roamable by default // make it roamable by default
canRoam = true; canRoam = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册