ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gin...@apache.org
Subject ant git commit: Redundant explicit iterator
Date Sun, 12 Aug 2018 12:56:38 GMT
Repository: ant
Updated Branches:
  refs/heads/master d92e553d8 -> 18eb262de


Redundant explicit iterator

Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/18eb262d
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/18eb262d
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/18eb262d

Branch: refs/heads/master
Commit: 18eb262de0e5f92ee0de1b49395ddd6cac24c90a
Parents: d92e553
Author: Gintas Grigelionis <gintas@apache.org>
Authored: Sun Aug 12 14:56:23 2018 +0200
Committer: Gintas Grigelionis <gintas@apache.org>
Committed: Sun Aug 12 14:56:23 2018 +0200

----------------------------------------------------------------------
 .../org/apache/tools/ant/types/resources/selectors/Majority.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/18eb262d/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java b/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
index e87e232..7adcbf7 100644
--- a/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
+++ b/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
@@ -64,8 +64,8 @@ public class Majority extends ResourceSelectorContainer
         boolean even = count % 2 == 0;
         int threshold = count / 2;
 
-        for (Iterator<ResourceSelector> i = getSelectors(); i.hasNext();) {
-            if (i.next().isSelected(r)) {
+        for (ResourceSelector rs : getResourceSelectors()) {
+            if (rs.isSelected(r)) {
                 ++passed;
                 if (passed > threshold || (even && tie && passed == threshold))
{
                     return true;


Mime
View raw message