[
https://issues.apache.org/jira/browse/COLLECTIONS-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13644033#comment-13644033
]
Sebb commented on COLLECTIONS-454:
----------------------------------
The Findbugs explanation is:
{quote}
The entrySet() method is allowed to return a view of the underlying Map in
which an Iterator and Map.Entry. This clever idea was used in several Map
implementations, but introduces the possibility of nasty coding mistakes. If a
map m returns such an iterator for an entrySet, then c.addAll(m.entrySet())
will go badly wrong. All of the Map implementations in OpenJDK 1.7 have been
rewritten to avoid this, you should to.
{quote}
We should follow the Findbugs advice here.
The additional overhead is likely to be quite small.
Any errors caused by not fixing the bug may be extremely tricky to find.
> findBugs Warning: Flat3Map - 3 iterators which are "both an Iterator and 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