[JENKINS-40252] Switch to allItems where traversal order is not important

- Also switch in cases where we have a subset that is likely significantly smaller and hence quicker to sort
This commit is contained in:
Stephen Connolly committed 2016-12-15 10:35:00 +00:00
1 parent ab849a3054
commit 16254cb8ba
19 files changed
+139 -75

No files matched your search

@@ -59,7 +59,7 @@ public class DependencyRunner implements Runnable {
Set<AbstractProject> topLevelProjects = new HashSet<AbstractProject>();
// Get all top-level projects
LOGGER.fine("assembling top level projects");
for (AbstractProject p : Jenkins.getInstance().getAllItems(AbstractProject.class))
for (AbstractProject p : Jenkins.getInstance().allItems(AbstractProject.class))
if (p.getUpstreamProjects().size() == 0) {
LOGGER.fine("adding top level project " + p.getName());
topLevelProjects.add(p);