提交 b9d8b1af 编写于 作者: K kohsuke

added a defensive check in case plugins fail to compute the changelog. This...

added a defensive check in case plugins fail to compute the changelog. This causes a Jelly error in the following line because the "set" variable is null.

        <j:set var="set" value="${it.changeSet}" />
        <t:summary icon="notepad.gif">
          <j:choose>
            <j:when test="${it.hasChangeSetComputed()}">
-->           <st:include it="${set}" page="digest.jelly" />


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17299 71c3de6d-444a-0410-be80-ed276b4c234a
上级 1fd8b967
...@@ -400,7 +400,15 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs ...@@ -400,7 +400,15 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
scm = new CVSChangeLogParser(); scm = new CVSChangeLogParser();
if(changeSet==null) // cached value if(changeSet==null) // cached value
changeSet = calcChangeSet(); try {
changeSet = calcChangeSet();
} finally {
// defensive check. if the calculation fails (such as through an exception),
// set a dummy value so that it'll work the next time. the exception will
// be still reported, giving the plugin developer an opportunity to fix it.
if(changeSet==null)
changeSet=ChangeLogSet.createEmpty(this);
}
return changeSet; return changeSet;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册