The proposed patch fixed half the problem.

Full fix and test case committed in svn r219131.

Stephen

[EMAIL PROTECTED] wrote:
I can't get in to CVS to see if this is fixed, but there is a bug in AbstractMapBag in 3.1: BagIterator.remove() does not properly remove the last instance of a given item; the result is infinite looping. Here is a patch.

-steve

Steve Clark
ECOS Development Group
[EMAIL PROTECTED]
(970)226-9291


--- AbstractMapBag.java.orig    2005-07-14 11:14:33.708373173 -0600
+++ AbstractMapBag.java 2005-07-14 11:15:30.566623793 -0600
@@ -221,7 +221,7 @@
                 throw new IllegalStateException();
             }
             MutableInteger mut = (MutableInteger) current.getValue();
-            if (mut.value > 0) {
+            if (mut.value > 1) {
                 mut.value--;
                 parent.size--;
             } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to