You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/03/28 21:28:13 UTC

[GitHub] ctubbsii commented on a change in pull request #410: Fixed inefficient auths check

ctubbsii commented on a change in pull request #410: Fixed inefficient auths check
URL: https://github.com/apache/accumulo/pull/410#discussion_r177895877
 
 

 ##########
 File path: server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
 ##########
 @@ -163,11 +163,19 @@ public void changeAuthorizations(String user, Authorizations authorizations) thr
 
   @Override
   public boolean isValidAuthorizations(String user, List<ByteBuffer> auths) throws AccumuloSecurityException {
-    Collection<ByteBuffer> userauths = getCachedUserAuthorizations(user).getAuthorizationsBB();
-    for (ByteBuffer auth : auths)
-      if (!userauths.contains(auth))
+    if (auths.size() == 0) {
 
 Review comment:
   You should call `.isEmpty()`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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