Skip to content

Commit

Permalink
[FIXED JENKINS-13669] NPE when possiblyCachedRepo == null.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Mar 14, 2013
1 parent 25d1837 commit 8f3d32c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/hudson/plugins/mercurial/MercurialSCM.java
Expand Up @@ -239,8 +239,10 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,
if (!requiresWorkspaceForPolling()) {
launcher = Hudson.getInstance().createLauncher(listener);
PossiblyCachedRepo possiblyCachedRepo = cachedSource(Hudson.getInstance(), launcher, listener, true);
FilePath repositoryCache = new FilePath(new File(possiblyCachedRepo.getRepoLocation()));
return compare(launcher, listener, baseline, output, Hudson.getInstance(), repositoryCache);
if (possiblyCachedRepo != null) {
FilePath repositoryCache = new FilePath(new File(possiblyCachedRepo.getRepoLocation()));
return compare(launcher, listener, baseline, output, Hudson.getInstance(), repositoryCache);
}
}
// XXX do canUpdate check similar to in checkout, and possibly return INCOMPARABLE

Expand Down

0 comments on commit 8f3d32c

Please sign in to comment.