Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3366)
JoinedIterator remove method broken

Anupam M (JIRA)

2008-06-30


Author LoginPost Reply
JoinedIterator remove method broken
-----------------------------------

          Key: HHH-3366
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3366
        Project: Hibernate3
      Issue Type: Bug
  Affects Versions: 3.2.5
     Environment: N/A
       Reporter: Daniel De Graaf
       Priority: Minor


The remove() method will always delegate to the first iterator.
 public void test() {
   ArrayList<Integer> list1 = new ArrayList<Integer>();
   ArrayList<Integer> list2 = new ArrayList<Integer>();
   list1.add(1);
   list1.add(2);
   list2.add(3);
   list2.add(4);
   JoinedIterator i = new JoinedIterator(list1.iterator(),list2.iterator());
   while (i.hasNext()) {
     int item = (Integer)i.next();
     if (item == 3) {
       i.remove();
     }
   }
   assertEquals(2, list1.size());
   assertEquals(1, list2.size());
 }

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

   
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.