Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-235

LRUDataContainer keySet() looping fails when inside there's a get call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 4.0.0.CR1
    • 4.0.0.BETA2
    • None
    • None

    Description

      LRUDataContainer has issues with looping when inside the loop there's a get() call on the data container. Example from LRUDataContainerTest:

      public void testPutAndLoop() {
      for (int i = 0; i < 10; i++) dc.put(i, "value", -1, -1);

      int i = 0;
      for (Object key : dc.keySet())

      { dc.get(key); i++; }

      assert i == 10;
      }

      Currently, the test fails cos the final value of i is 1. This means that the loop only runs once when it should have run 10 times.

      Attachments

        Activity

          People

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: