提交 773fdeeb 编写于 作者: K kohsuke

avoid instanceof.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@22985 71c3de6d-444a-0410-be80-ed276b4c234a
上级 3fc44fdf
......@@ -443,17 +443,15 @@ public class Queue extends ResourceController implements Saveable {
// the requested build is already queued, so will not be added
added = null;
List<WaitingItem> waitingDuplicates = new ArrayList<WaitingItem>();
for(Item item : duplicatesInQueue) {
for(FoldableAction a : Util.filter(actions,FoldableAction.class)) {
a.foldIntoExisting(item.task, item.getActions());
}
if ((item instanceof WaitingItem))
waitingDuplicates.add((WaitingItem)item);
}
// TODO: avoid calling scheduleMaintenance() if none of the waiting items
// actually change
for(WaitingItem wi : waitingDuplicates) {
for(WaitingItem wi : Util.filter(duplicatesInQueue,WaitingItem.class)) {
if(quietPeriod<=0) {
// the user really wants to build now, and they mean NOW.
// so let's pull in the timestamp if we can.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册