File tree Expand file tree Collapse file tree
core/src/main/java/hudson/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393import java .util .GregorianCalendar ;
9494import java .util .HashMap ;
9595import java .util .HashSet ;
96- import java .util .Iterator ;
9796import java .util .LinkedHashSet ;
9897import java .util .List ;
9998import java .util .Map ;
@@ -1541,7 +1540,7 @@ public void maintain() {
15411540
15421541 { // blocked -> buildable
15431542 // copy as we'll mutate the list and we want to process in a potentially different order
1544- List <BlockedItem > blockedItems = new ArrayList <>(blockedProjects . values ( ));
1543+ List <BlockedItem > blockedItems = new ArrayList <>(( blockedProjects ));
15451544 // if facing a cycle of blocked tasks, ensure we process in the desired sort order
15461545 if (s != null ) {
15471546 s .sortBlockedItems (blockedItems );
@@ -2954,29 +2953,8 @@ public boolean containsKey(Task task) {
29542953 return get (task ) != null ;
29552954 }
29562955
2957- public T remove (Task task ) {
2958- Iterator <T > it = iterator ();
2959- while (it .hasNext ()) {
2960- T t = it .next ();
2961- if (t .task .equals (task )) {
2962- it .remove ();
2963- return t ;
2964- }
2965- }
2966- return null ;
2967- }
2968-
2969- public void put (Task task , T item ) {
2970- assert item .task .equals (task );
2971- add (item );
2972- }
2973-
2974- public ItemList <T > values () {
2975- return this ;
2976- }
2977-
29782956 /**
2979- * Works like {@link #remove(Task)} but also marks the {@link Item} as cancelled.
2957+ * Removes a task and marks the {@link Item} as cancelled.
29802958 */
29812959 public T cancel (Task p ) {
29822960 T x = get (p );
You can’t perform that action at this time.
0 commit comments