* java/util/LinkedList.java (removeFirst): Update `first' field.
Handle the last == first case.
(removeLast): Update `last' field. Handle the last == first case.
From-SVN: r37940
* java/lang/dtoa.c: Include string.h.
* java/lang/natString.cc (toLowerCase): Initialize `ch' to prevent
compiler warning.
+
+ From Adam Welc <welc@cs.purdue.edu>:
+ * java/util/LinkedList.java (removeFirst): Update `first' field.
+ Handle the last == first case.
+ (removeLast): Update `last' field. Handle the last == first case.
2000-12-01 Warren Levy <warrenl@cygnus.com>
if (first.next != null)
first.next.previous = null;
+ else
+ last = null;
+
+ first = first.next;
+
return r;
}
Object r = last.data;
if (last.previous != null)
- last.previous.next = null;
+ last.previous.next = null;
+ else
+ first = null;
+
+ last = last.previous;
+
return r;
}