fixed IndexOutOfBoundsException

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130515 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Morgan James Delagrange 2002-02-13 21:03:20 +00:00
parent e71840e0bb
commit c5c64c02d3
1 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/LRUMap.java,v 1.3 2002/02/10 12:56:39 jstrachan Exp $
* $Revision: 1.3 $
* $Date: 2002/02/10 12:56:39 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/LRUMap.java,v 1.4 2002/02/13 21:03:20 morgand Exp $
* $Revision: 1.4 $
* $Date: 2002/02/13 21:03:20 $
*
* ====================================================================
*
@ -148,7 +148,7 @@ public class LRUMap extends HashMap implements Externalizable {
* @return the key of the removed item
*/
public Object removeLRU() {
int lastItem = size();
int lastItem = size() - 1;
Object key = bubbleList.remove( lastItem );
ValuePositionPair pair = removePair( key );
return key;