Skip to content
Permalink
Browse files

JENKINS-13160 Return a NullChangeLogParser instead of just 'null' in …

…CloneWorkspaceSCM.createChangeLogParser().
  • Loading branch information
rzwerus committed Feb 21, 2013
1 parent 968dff3 commit 8716c62db6f86c495de7fb7068d82cf39ea72422
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java
@@ -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;
@@ -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) {

0 comments on commit 8716c62

Please sign in to comment.
You can’t perform that action at this time.