Skip to content
Permalink
Browse files

Merge pull request #314 from alonbl/JENKINS-38542

[JENKINS-38542] NPE when canceling a task when no job
  • Loading branch information
rsandell committed Jun 9, 2017
2 parents 35a03f0 + 1d32470 commit e0ad9f1cf9190b0db67fcb43fa1aea33c946c631
@@ -550,7 +550,11 @@ public static GerritTrigger getTrigger(@Nullable Job project) {
*/
public void cancelTimer() {
if (gerritTriggerTimerTask != null) {
logger.trace("GerritTrigger.cancelTimer(): {0}", job.getName());
String name = "N/A";
if (job != null) {
name = job.getName();
}
logger.trace("GerritTrigger.cancelTimer(): {}", name);
gerritTriggerTimerTask.cancel();
gerritTriggerTimerTask = null;
}

0 comments on commit e0ad9f1

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