commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r772539 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java
Date Thu, 07 May 2009 08:11:05 GMT
Author: bayard
Date: Thu May  7 08:10:59 2009
New Revision: 772539

URL: http://svn.apache.org/viewvc?rev=772539&view=rev
Log:
Updating to java 5 foreach - LANG-336

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java?rev=772539&r1=772538&r2=772539&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java Thu May  7 08:10:59
2009
@@ -19,7 +19,6 @@
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
@@ -243,8 +242,7 @@
      * @return <code>true</code> if the set contains the characters
      */
     public boolean contains(char ch) {
-        for (Iterator<CharRange> it = set.iterator(); it.hasNext();) {
-            CharRange range = it.next();
+        for (CharRange range : set) {
             if (range.contains(ch)) {
                 return true;
             }



Mime
View raw message