Skip to content
Permalink
Browse files

[JENKINS-38542] NPE when canceling a task when no job

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
  • Loading branch information
alonbl committed May 24, 2017
1 parent 35a03f0 commit 1d32470048bd54d3fa14f3940bf709ad4dced2b3
@@ -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 1d32470

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