diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 8aad4b0acc..0556b1c318 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -1569,8 +1569,15 @@ public class Queue extends ResourceController implements Saveable { } } - if (s != null) - s.sortBuildableItems(buildables); + if (s != null) { + try { + s.sortBuildableItems(buildables); + } catch (Throwable e) { + // We don't really care if the sort doesn't sort anything, we still should + // continue to do our job. We'll complain about it and continue. + LOGGER.log(Level.WARNING, "s.sortBuildableItems() threw Throwable: {0}", e); + } + } // Ensure that identification of blocked tasks is using the live state: JENKINS-27708 & JENKINS-27871 updateSnapshot();