mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
id is only used for sorting
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9463 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
4a0d9d907d
commit
25514b706b
1 file changed
+9
-9
@@ -672,12 +672,6 @@ public class Queue extends ResourceController {
|
||||
*/
|
||||
public final Task task;
|
||||
|
||||
/**
|
||||
* Unique number of this {@link Item}.
|
||||
* Used to differentiate {@link Item}s with the same due date.
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* Build is blocked because another build is in progress,
|
||||
* required {@link Resource}s are not available, or otherwise blocked
|
||||
@@ -696,9 +690,6 @@ public class Queue extends ResourceController {
|
||||
|
||||
protected Item(Task project) {
|
||||
this.task = project;
|
||||
synchronized (Queue.this) {
|
||||
this.id = iota++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -722,9 +713,18 @@ public class Queue extends ResourceController {
|
||||
@Exported
|
||||
public Calendar timestamp;
|
||||
|
||||
/**
|
||||
* Unique number of this {@link WaitingItem}.
|
||||
* Used to differentiate {@link WaitingItem}s with the same due date, to make it sortable.
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
WaitingItem(Calendar timestamp, Task project) {
|
||||
super(project);
|
||||
this.timestamp = timestamp;
|
||||
synchronized (Queue.this) {
|
||||
this.id = iota++;
|
||||
}
|
||||
}
|
||||
|
||||
public int compareTo(WaitingItem that) {
|
||||
|
||||
Reference in new issue
Block a user