Author: lukaszlenart Date: Fri Jul 12 07:13:11 2013 New Revision: 1502447 URL: http://svn.apache.org/r1502447 Log: WW-4123 Improves loops
Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java?rev=1502447&r1=1502446&r2=1502447&view=diff ============================================================================== --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java Fri Jul 12 07:13:11 2013 @@ -19,7 +19,6 @@ import com.opensymphony.xwork2.util.Text import com.opensymphony.xwork2.util.WildcardHelper; import java.util.HashMap; -import java.util.Iterator; import java.util.Set; /** @@ -51,16 +50,17 @@ public class MethodFilterInterceptorUtil // quick check to see if any actual pattern matching is needed boolean needsPatternMatch = false; - Iterator quickIter = includeMethods.iterator(); - for (String incMeth : includeMethods) { - if (!"*".equals(incMeth) && incMeth.contains("*")) { + for (String includeMethod : includeMethods) { + if (!"*".equals(includeMethod) && includeMethod.contains("*")) { needsPatternMatch = true; + break; } } - for (String incMeth : excludeMethods) { - if (!"*".equals(incMeth) && incMeth.contains("*")) { + for (String excludeMethod : excludeMethods) { + if (!"*".equals(excludeMethod) && excludeMethod.contains("*")) { needsPatternMatch = true; + break; } }