[infinispan-issues] [JBoss JIRA] (ISPN-2337) Query iterators are buggy

Marko Lukša (JIRA) jira-events at lists.jboss.org
Mon Sep 24 06:35:35 EDT 2012


Marko Lukša created ISPN-2337:
---------------------------------

             Summary: Query iterators are buggy
                 Key: ISPN-2337
                 URL: https://issues.jboss.org/browse/ISPN-2337
             Project: Infinispan
          Issue Type: Bug
          Components: Querying
    Affects Versions: 5.2.0.Alpha4
            Reporter: Marko Lukša
            Assignee: Marko Lukša


I have found multiple problems with the iterators returned by CacheQueryImpl.

- using LazyIterator with fetchSize fails with ArrayIndexOutOfBoundsException
- calling previous() after next() doesn't return expected element
- calling nextIndex() on a new iterator should return 0, not 1 (the same also applies when calling nextIndex() after calling first())
- if fetchSize is greater than 1, LazyIterator fills the whole buffer on every invocation of .previous()
- nextIndex() and previousIndex() throw NoSuchElementException, which violates the contract of ListInterface
- next() and previous() throw ArrayIndexOutOfBoundsException when they should be throwing NoSuchElementException
- ...




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the infinispan-issues mailing list