[infinispan-issues] [JBoss JIRA] Created: (ISPN-235) LRUDataContainer keySet() looping fails when inside there's a get call

Galder Zamarreno (JIRA) jira-events at lists.jboss.org
Thu Oct 22 14:00:05 EDT 2009


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

                 Key: ISPN-235
                 URL: https://jira.jboss.org/jira/browse/ISPN-235
             Project: Infinispan
          Issue Type: Bug
    Affects Versions: 4.0.0.BETA2
            Reporter: Galder Zamarreno
            Assignee: Galder Zamarreno
            Priority: Critical
             Fix For: 4.0.0.CR1


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list