dlmarion commented on code in PR #3276:
URL: https://github.com/apache/accumulo/pull/3276#discussion_r1157692172


##########
core/src/main/java/org/apache/accumulo/core/security/Authorizations.java:
##########
@@ -112,8 +124,13 @@ private void checkAuths() {
    */
   public Authorizations(Collection<byte[]> authorizations) {
     checkArgument(authorizations != null, "authorizations is null");
-    for (byte[] auth : authorizations)
+    Pair<Set<ByteSequence>,List<byte[]>> collections =
+        createInternalCollections(authorizations.size());
+    this.auths = collections.getFirst();
+    this.authsList = collections.getSecond();

Review Comment:
   I went ahead and broke the single method into two, removing the need for 
Pair. I was using Pair as a struct, trying to minimize the methods called, but 
I think it may not matter in the long run. Certainly, not allocating a 
temporary object is better here.



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