You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2020/04/07 21:02:16 UTC

[GitHub] [tomcat] michael-o commented on a change in pull request #272: Loop can be terminated after condition is met

michael-o commented on a change in pull request #272: Loop can be terminated after condition is met
URL: https://github.com/apache/tomcat/pull/272#discussion_r405110511
 
 

 ##########
 File path: java/org/apache/catalina/realm/RealmBase.java
 ##########
 @@ -756,10 +756,11 @@ public void backgroundProcess() {
                 }
 
                 boolean matched = false;
-                for(int k=0; k < patterns.length && !matched; k++) {
+                for(int k = 0; k < patterns.length; k++) {
 
 Review comment:
   Why not make it foreach directly?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org