提交 2fa40188 编写于 作者: R Richard Mortimer

Ignore null reporters field and avoid a NPE.

The NPE can occur if a build fails during checkout and hence the run phase
never gets called. See JENKINS-10831 for an example of this happening.
上级 8dfa5e19
......@@ -750,8 +750,11 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
}
public void post2(BuildListener listener) throws Exception {
for (MavenReporter reporter : reporters)
reporter.end(MavenBuild.this,launcher,listener);
if (reporters != null) {
for (MavenReporter reporter : reporters) {
reporter.end(MavenBuild.this,launcher,listener);
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册