commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23201] - [collections] TestObservedBag and TestObservedSet fail under Java 1.3.1
Date Fri, 19 Sep 2003 20:37:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23201>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23201

[collections] TestObservedBag and TestObservedSet fail under Java 1.3.1





------- Additional Comments From janekdb@yahoo.co.uk  2003-09-19 20:37 -------
I looked into this a (tiny) bit and discovered that the fault is related to an
assumption made in ObservedTestHelper.doTestRemoveIterated(ObservedFactory
factory) about the order of elements returned by the iterator:

        coll.addAll(SIX_SEVEN_LIST);
        LISTENER.preEvent = null;
        LISTENER.postEvent = null;
        Assert.assertEquals(2, coll.size());
        Iterator it = coll.iterator();
        it.next();
        it.next();
        it.remove();
        Assert.assertEquals(1, coll.size());

Here the last element of the collection is removed however the order the
elements returned by the iterator is different between JDK 1.3.1 and JDK 1.4.1.

The order by type is show here:

                       1.3.1    1.4.1     

  ObservedBag          7, 6     6, 7
  ObservedBuffer       6, 7     6, 7
  ObservedCollection   6, 7     6, 7
  ObservedList         6, 7     6, 7
  ObservedSet          7, 6     6, 7

Mime
View raw message