commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Nistor (JIRA)" <>
Subject [jira] [Created] (COLLECTIONS-472) wasted work in AbstractMapBag.containsAll()
Date Mon, 03 Jun 2013 23:00:21 GMT
Adrian Nistor created COLLECTIONS-472:

             Summary: wasted work in AbstractMapBag.containsAll()
                 Key: COLLECTIONS-472
             Project: Commons Collections
          Issue Type: Bug
          Components: Bag
    Affects Versions: 3.2.1
         Environment: any
            Reporter: Adrian Nistor
         Attachments: patch.diff

The problem appears in version 3.2.1 and in revision 1489197.  I
attached a one-line patch that fixes it.

In method "AbstractMapBag.containsAll", the loop over
"other.uniqueSet()" should return immediately after "result" becomes
"false", because "result = result && contains;" can never become
"true" again.  All the iterations after "result" becomes "false" do
not perform any useful work, at best they just set "result" again to

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:

View raw message