commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13722] New: - LRUMap.get doesn't change usage status
Date Thu, 17 Oct 2002 07:48:47 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message