[GitHub] ant pull request #42: Fix the inefficient use of keySet iterator with entryS...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] ant pull request #42: Fix the inefficient use of keySet iterator with entryS...

bodewig
GitHub user BruceKuiLiu opened a pull request:

    https://github.com/apache/ant/pull/42

    Fix the inefficient use of keySet iterator with entrySet iterator.

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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/ant master2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant/pull/42.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #42
   
----
commit fb817dd2c4b01a1840f1c06940c71de3ec60ce0a
Author: Kui LIU <[hidden email]>
Date:   2017-10-11T12:18:19Z

    Fix the inefficient use of keySet iterator with entrySet iterator.
   
    The current source code accesses the key and value of a Hashtable entry, using a key that is retrieved from a keySet iterator.
    It is more efficient to use an iterator on the entrySet of the Hashtable, to avoid the Map.get(key) lookup.

commit ab65a09dc00d9baa55a088dbffeec414fbda9bc9
Author: Kui LIU <[hidden email]>
Date:   2017-10-11T12:42:46Z

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

commit 6a9a466b275b553637277b980139b6297a166483
Author: Kui LIU <[hidden email]>
Date:   2017-10-11T12:51:12Z

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

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant pull request #42: Fix the inefficient use of keySet iterator with entryS...

bodewig
Github user asfgit closed the pull request at:

    https://github.com/apache/ant/pull/42


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant issue #42: Fix the inefficient use of keySet iterator with entrySet iter...

bodewig
In reply to this post by bodewig
Github user bodewig commented on the issue:

    https://github.com/apache/ant/pull/42
 
    I had to fix the last two commits with 61811c2bc as the code wouldn't compile otherwise. Have I done anything wrong while applying the patches?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]