You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/10/17 09:48:47 UTC
DO NOT REPLY [Bug 13722] New: -
LRUMap.get doesn't change usage status
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13722>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13722
LRUMap.get doesn't change usage status
Summary: LRUMap.get doesn't change usage status
Product: Commons
Version: 2.0 Final
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Collections
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: frank.finger@hybris.de
LRUMap drops the least resently added item, not the least recently used one. The
following test fails in line 6 (and 7, if you comment out 6).
1: LRUMap map = new LRUMap( 2 );
2: map.put( "2", "zwei" );
3: map.put( "3", "drei" );
4: map.get( "2" ); // now, "2" should be least recently used
5: map.put( "4", "vier" ); // this should drop "3"
6: assertEquals( "zwei", map.get("2") );
7: assertEquals( null, map.get("3") );
8: assertEquals( "vier", map.get("4") );
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>