Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-13160 Return a NullChangeLogParser instead of just 'null' in …
…CloneWorkspaceSCM.createChangeLogParser().
  • Loading branch information
Robert Zwerus committed Feb 21, 2013
1 parent 968dff3 commit 8716c62
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -26,6 +26,7 @@
import hudson.scm.PollingResult;
import hudson.scm.SCM;
import hudson.scm.ChangeLogParser;
import hudson.scm.NullChangeLogParser;
import hudson.scm.SCMDescriptor;
import hudson.scm.SCMRevisionState;
import static hudson.scm.PollingResult.BUILD_NOW;
Expand Down Expand Up @@ -182,12 +183,11 @@ private boolean calcChangeLog(AbstractBuild<?,?> parentBuild, File changelogFile
@Override
public ChangeLogParser createChangeLogParser() {
AbstractProject<?,?> p = getContainingProject();
if (p == null) {
return null;
AbstractBuild lastBuild = null;
if (p != null) {
lastBuild = p.getLastBuild();
}

final AbstractBuild lastBuild = p.getLastBuild();

try {
return resolve(getParamParentJobName(lastBuild)).getParent().getProject().getScm().createChangeLogParser();
} catch (ResolvedFailedException e) {
Expand Down

0 comments on commit 8716c62

Please sign in to comment.