提交 ae354a96 编写于 作者: A abayer

[FIXED HUDSON-6429] Check for null results to handle aborted incremental Maven...

[FIXED HUDSON-6429] Check for null results to handle aborted incremental Maven builds - thanks to kutzi for the patch

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33250 71c3de6d-444a-0410-be80-ed276b4c234a
上级 98b2edad
......@@ -654,7 +654,8 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
*/
public RunT getPreviousBuiltBuild() {
RunT r=previousBuild;
while( r!=null && r.getResult()==Result.NOT_BUILT )
// in certain situations (aborted m2 builds) r.getResult() can still be null, although it should theoretically never happen
while( r!=null && (r.getResult() == null || r.getResult()==Result.NOT_BUILT) )
r=r.previousBuild;
return r;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册