commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COLLECTIONS-472) wasted work in AbstractMapBag.containsAll()
Date Sun, 09 Jun 2013 18:36:20 GMT

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

Thomas Neidhart resolved COLLECTIONS-472.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

Applied in r1491258. Thanks for the patch!
                
> 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
>             Fix For: 4.0
>
>         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

Mime
View raw message