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

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

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

      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.

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: