Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-279

LRUMap: moveToMRU is not invoked for new entry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 3.2
    • None
    • Map
    • None

    Description

      @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); }

      Attachments

        1. AbstractLinkedMap.java.diff
          0.6 kB
          Benjamin Riefenstahl

        Issue Links

          Activity

            People

              Unassigned Unassigned
              someone Andrey Andreev
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: