commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1169521 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
Date Sun, 11 Sep 2011 20:10:59 GMT
Author: ggregory
Date: Sun Sep 11 20:10:58 2011
New Revision: 1169521

URL: http://svn.apache.org/viewvc?rev=1169521&view=rev
Log:
Convert to Java 5 enhanced for loops.

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java?rev=1169521&r1=1169520&r2=1169521&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
Sun Sep 11 20:10:58 2011
@@ -88,8 +88,8 @@ public class FixedOrderComparator<T> imp
         if (items == null) {
             throw new IllegalArgumentException("The list of items must not be null");
         }
-        for (int i = 0; i < items.length; i++) {
-            add(items[i]);
+        for (T item : items) {
+            add(item);
         }
     }
 



Mime
View raw message