[ 
https://issues.apache.org/jira/browse/COLLECTIONS-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrian Nistor updated COLLECTIONS-472:
--------------------------------------

    Attachment: patch.diff
    
> wasted work in AbstractMapBag.containsAll()
> -------------------------------------------
>
>                 Key: COLLECTIONS-472
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-472
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Bag
>    Affects Versions: 3.2.1
>         Environment: any
>            Reporter: Adrian Nistor
>              Labels: patch,, performance
>         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
> "false".

--
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: http://www.atlassian.com/software/jira

Reply via email to