incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r711300 - /incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java
Date Tue, 04 Nov 2008 16:27:11 GMT
Author: ryan
Date: Tue Nov  4 08:27:11 2008
New Revision: 711300

URL: http://svn.apache.org/viewvc?rev=711300&view=rev
Log:
updating to java 1.5 iterator syntax

Modified:
    incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java

Modified: incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java
URL: http://svn.apache.org/viewvc/incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java?rev=711300&r1=711299&r2=711300&view=diff
==============================================================================
--- incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java (original)
+++ incubator/droids/trunk/src/java/org/apache/http/norobots/RulesEngine.java Tue Nov  4 08:27:11
2008
@@ -26,7 +26,6 @@
 package org.apache.http.norobots;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -60,16 +59,12 @@
    * no rules for this path.. 
    */
   public Boolean isAllowed(String path) {
-
-    Iterator<Rule> iterator = this.rules.iterator();
-    while(iterator.hasNext()) {
-      Rule rule = (Rule)iterator.next();
+    for( Rule rule : rules ) {
       Boolean test = rule.isAllowed(path);
       if(test != null) {
         return test;
       }
     }
-
     return null;
   }
 



Mime
View raw message