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.

From-SVN: r37940
This commit is contained in:
Bryce McKinlay 2000-12-02 01:48:07 +00:00 committed by Bryce McKinlay
parent dc957d1435
commit aaa4cecd22
2 changed files with 16 additions and 1 deletions

View File

@ -6,6 +6,11 @@
* 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>
* Makefile.am: Added entries for new java.sql modules.

View File

@ -183,6 +183,11 @@ public class LinkedList extends AbstractSequentialList
if (first.next != null)
first.next.previous = null;
else
last = null;
first = first.next;
return r;
}
@ -196,6 +201,11 @@ public class LinkedList extends AbstractSequentialList
if (last.previous != null)
last.previous.next = null;
else
first = null;
last = last.previous;
return r;
}