mattisonchao commented on a change in pull request #2745:
URL: https://github.com/apache/bookkeeper/pull/2745#discussion_r662788132



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/tls/BookieAuthZFactory.java
##########
@@ -95,6 +95,7 @@ public void onProtocolUpgrade() {
                         for (String allowedRole : allowedRoles) {
                             if (certRole[0].equals(allowedRole)) {
                                 authorized = true;
+                                break;
                             }
                         }
                         if (authorized) {

Review comment:
        When we first judge that `authorized` is true, we should break out of 
the loop to avoid the next useless loop. :)




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to