commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COLLECTIONS-279) LRUMap: moveToMRU is not invoked for new entry
Date Thu, 28 Feb 2013 19:29:15 GMT

     [ https://issues.apache.org/jira/browse/COLLECTIONS-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Neidhart resolved COLLECTIONS-279.
-----------------------------------------

    Resolution: Duplicate
    
> LRUMap: moveToMRU is not invoked for new entry
> ----------------------------------------------
>
>                 Key: COLLECTIONS-279
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-279
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Andrey Andreev
>            Priority: Blocker
>         Attachments: AbstractLinkedMap.java.diff
>
>
> 	@Test
> 	public void testFirst() {
> 		LRUMap map = new LRUMap();
> 		String key = "key1";
> 		String value = "value1";
> 		map.put(key, value);
> 		Assert.assertEquals(map.get(key), value);
> 		Assert.assertEquals(map.get(map.firstKey()), value);
> 		
> 		key = "key2";
> 		value = "value2";
> 		map.put(key, value);
> 		// here it fails
> 		Assert.assertEquals(map.get(map.firstKey()), value);
> 	}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message