Skip to content

Replace the keySet iterator with an entrySet iterator. - #2024

Closed
Kui-Liu wants to merge 1 commit into
apache:masterfrom
Kui-Liu:master4
Closed

Kui-Liu wants to merge 1 commit into
apache:masterfrom
Kui-Liu:master4

Conversation

@Kui-Liu

@Kui-Liu Kui-Liu commented Oct 11, 2017

Copy link
Copy Markdown
Contributor

The current source code accesses the value of a Map entry of methodMap, using a key that is retrieved from a keySet iterator.
It is more efficient to use an iterator on the entrySet of the methodMap, to avoid the Map.get(key) lookup.
http://findbugs.sourceforge.net/bugDescriptions.html#WMI_WRONG_MAP_ITERATOR

The current source code accesses the value of a Map entry of methodMap, using a key that is retrieved from a keySet iterator.
It is more efficient to use an iterator on the entrySet of the methodMap, to avoid the Map.get(key) lookup.
http://findbugs.sourceforge.net/bugDescriptions.html#WMI_WRONG_MAP_ITERATOR
@davsclaus

Copy link
Copy Markdown
Contributor

Thanks for the PR it has been merged. Do you mind closing this?

@Kui-Liu

Kui-Liu commented Oct 11, 2017

Copy link
Copy Markdown
Contributor Author

Thanks.

@Kui-Liu Kui-Liu closed this Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants