Fix NPE
Caused by: java.lang.NullPointerException
at io.jenkins.blueocean.service.embedded.rest.QueueUtil.getQueuedItem(QueueUtil.java:24)
at io.jenkins.blueocean.events.BlueMessageEnricher.enrich(BlueMessageEnricher.java:96)
at org.jenkinsci.plugins.pubsub.PubsubBus.publish(PubsubBus.java:133)
... 21 more
@@ -21,7 +21,7 @@ public class QueueUtil {
public static BlueQueueItem getQueuedItem(final hudson.model.Queue.Item item, Job job) {
for(BlueQueueItem qi: getQueuedItems(job)){
- if(qi.getId().equalsIgnoreCase(Long.toString(item.getId()))){
+ if(qi.getId() != null && qi.getId().equalsIgnoreCase(Long.toString(item.getId()))){
return qi;
}
}
