[jboss-jira] [JBoss JIRA] Created: (JBCACHE-795) listIterator in a cached list throws exception on empty list

Nitzan Niv (JIRA) jira-events at jboss.com
Thu Oct 5 16:16:42 EDT 2006


listIterator in a cached list throws exception on empty list
------------------------------------------------------------

                 Key: JBCACHE-795
                 URL: http://jira.jboss.com/jira/browse/JBCACHE-795
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: PojoCache
            Reporter: Nitzan Niv
         Assigned To: Ben Wang


executing listIterator() on an empty cached List throws Exception even though it should be a valid operation that returns a valid iterator.
This also affects equals() (when the object is a Java empty list and the parameter is a cached empty list).

The following changes in CachedListImpl fix this:
in MyListIterator constructor:
         if(index < 0 || index > list_.size()) ...

in hasNext():
         return (index < list_.size());



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

        



More information about the jboss-jira mailing list