commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Andreev (JIRA)" <>
Subject [jira] Created: (COLLECTIONS-279) LRUMap: moveToMRU is not invoked for new entry
Date Wed, 28 Nov 2007 07:14:43 GMT
LRUMap: moveToMRU is not invoked for new entry

                 Key: COLLECTIONS-279
             Project: Commons Collections
          Issue Type: Bug
          Components: Map
    Affects Versions: 3.2
            Reporter: Andrey Andreev
            Priority: Blocker
             Fix For: 3.3

	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.
You can reply to this email to add a comment to the issue online.

View raw message