From 84028e7f519692da231e2ca325b63e3990b9a70f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 21 Aug 2007 22:01:37 -0600 Subject: [PATCH] fix reversed logic in LinkedList.addFirst()/addLast() --- classpath/java/util/LinkedList.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classpath/java/util/LinkedList.java b/classpath/java/util/LinkedList.java index 5deae40931..3cfa4447e1 100644 --- a/classpath/java/util/LinkedList.java +++ b/classpath/java/util/LinkedList.java @@ -32,8 +32,8 @@ public class LinkedList implements List { if (front == null) { front = rear = c; } else { - c.prev = rear; - rear = c; + c.next = front; + front = c; } } @@ -43,8 +43,8 @@ public class LinkedList implements List { if (front == null) { front = rear = c; } else { - c.next = front; - front = c; + c.prev = rear; + rear = c; } }