Skip to content

Commit

Permalink
Merge pull request #21 from christ66/ZD-21057
Browse files Browse the repository at this point in the history
Fixed NPE when onEnterBlocked() is called during startup.

A NPE can happen if the throttle concurrent plugin is enabled and the queue is blocked.

Relates to [JENKINS-24911]
  • Loading branch information
emsa23 committed Oct 20, 2014
2 parents 41e2edc + 72272f4 commit 9dd2052
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -58,7 +58,11 @@ public void onEnterBuildable(BuildableItem bi) {

@Override
public void onEnterBlocked(BlockedItem bi) {
QueueItemCache.get().getItem(bi.id).setBlocked();
ItemInfo item = QueueItemCache.get().getItem(bi.id);
// Null at startup
if (item != null) {
item.setBlocked();
}
}

}

0 comments on commit 9dd2052

Please sign in to comment.