mirror of
https://github.com/corda/corda.git
synced 2025-01-28 23:24:29 +00:00
fix reversed logic in LinkedList.addFirst()/addLast()
This commit is contained in:
parent
a68505ff48
commit
84028e7f51
@ -32,8 +32,8 @@ public class LinkedList<T> implements List<T> {
|
|||||||
if (front == null) {
|
if (front == null) {
|
||||||
front = rear = c;
|
front = rear = c;
|
||||||
} else {
|
} else {
|
||||||
c.prev = rear;
|
c.next = front;
|
||||||
rear = c;
|
front = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,8 +43,8 @@ public class LinkedList<T> implements List<T> {
|
|||||||
if (front == null) {
|
if (front == null) {
|
||||||
front = rear = c;
|
front = rear = c;
|
||||||
} else {
|
} else {
|
||||||
c.next = front;
|
c.prev = rear;
|
||||||
front = c;
|
rear = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user