Skip to content

Commit

Permalink
[JENKINS-28621] Jenkins jobs get held up in queue waiting for available
Browse files Browse the repository at this point in the history
executors, even though all are available

Refactored to avoid using apis intruduced in 1.7
  • Loading branch information
emsa23 committed Jun 6, 2015
1 parent 1e08b07 commit bc5faa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/jenkins/advancedqueue/sorter/ItemInfo.java
Expand Up @@ -151,9 +151,9 @@ public ItemStatus getItemStatus() {
public int compareTo(ItemInfo o) {
if(this.getWeight() == o.getWeight()) {
if(this.getSortableInQueueSince() == o.getSortableInQueueSince()) {
return Integer.compare(this.getItemId(), o.getItemId());
return new Integer(this.getItemId()).compareTo(o.getItemId());
}
return Long.compare(this.getInQueueSince(), o.getInQueueSince());
return new Long(this.getInQueueSince()).compareTo(o.getInQueueSince());
}
return Float.compare(this.getWeight(), o.getWeight());
}
Expand Down

0 comments on commit bc5faa9

Please sign in to comment.