mirror of
https://github.com/corda/corda.git
synced 2025-01-16 01:40:17 +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) {
|
||||
front = rear = c;
|
||||
} else {
|
||||
c.prev = rear;
|
||||
rear = c;
|
||||
c.next = front;
|
||||
front = c;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,8 +43,8 @@ public class LinkedList<T> implements List<T> {
|
||||
if (front == null) {
|
||||
front = rear = c;
|
||||
} else {
|
||||
c.next = front;
|
||||
front = c;
|
||||
c.prev = rear;
|
||||
rear = c;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user