You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2013/04/28 10:44:15 UTC

[jira] [Updated] (COLLECTIONS-454) findBugs Warning: Flat3Map uses several iterators which are both, an Iterator as well as a Map.Entry

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

Thomas Neidhart updated COLLECTIONS-454:
----------------------------------------

    Attachment: COLLECTIONS-454.patch

The attached patch adds a FlatMapEntry object that is returned by the EntryIterator.

The javadoc for the entrySet() method is updated to use mapIterator() if this additional object creation is not wanted.

We have two options:

 * apply this patch with the cost of some additional overhead when iterating over keys, values, entries (which I guess was the original idea to merge the iterator and entry)
 * add ignore filter to findbugs as in this specific case it is intended behavior (for performance reasons).

Any comments?
                
> findBugs Warning: Flat3Map uses several iterators which are both, an Iterator as well as a Map.Entry
> ----------------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-454
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-454
>             Project: Commons Collections
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>            Reporter: Thomas Neidhart
>             Fix For: 4.0
>
>         Attachments: COLLECTIONS-454.patch
>
>
> The iterators should be rewritten as suggested by findbugs.

--
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